Apply inspections

Alex Baker 13 years ago
parent 6a5e65184d
commit f2d770f03f

@ -57,6 +57,6 @@ public final class Operator {
@Override
public String toString() {
return this.operator.toString();
return this.operator;
}
}

@ -48,14 +48,6 @@ public class FilterCategoryWithNewButton extends FilterCategory {
// --- parcelable
/**
* {@inheritDoc}
*/
@Override
public int describeContents() {
return 0;
}
/**
* {@inheritDoc}
*/

@ -58,14 +58,6 @@ public class FilterWithCustomIntent extends Filter {
// --- parcelable
/**
* {@inheritDoc}
*/
@Override
public int describeContents() {
return 0;
}
/**
* {@inheritDoc}
*/

@ -39,14 +39,6 @@ public class FilterWithUpdate extends FilterWithCustomIntent {
// --- parcelable
/**
* {@inheritDoc}
*/
@Override
public int describeContents() {
return 0;
}
/**
* {@inheritDoc}
*/

@ -461,7 +461,7 @@ public class TagViewFragment extends TaskListFragment {
if (!intent.hasExtra("tag_id")) {
return;
}
if (tagData == null || !tagData.getValue(TagData.UUID).toString().equals(intent.getStringExtra("tag_id"))) {
if (tagData == null || !tagData.getValue(TagData.UUID).equals(intent.getStringExtra("tag_id"))) {
return;
}

@ -151,7 +151,7 @@ public class TagCaseMigrator {
}
@Deprecated
private int renameHelper(String oldTag, String newTag, boolean caseSensitive) {
private void renameHelper(String oldTag, String newTag, boolean caseSensitive) {
// First remove newTag from all tasks that have both oldTag and newTag.
metadataService.deleteWhere(
Criterion.and(
@ -168,7 +168,6 @@ public class TagCaseMigrator {
ret = metadataService.update(TagService.tagEqIgnoreCase(oldTag, Criterion.all), metadata);
}
invalidateTaskCache(newTag);
return ret;
}

@ -111,7 +111,7 @@ public class TagFilterExposer extends BroadcastReceiver implements AstridFilterE
}
Bundle extras = new Bundle();
extras.putString(TagViewFragment.EXTRA_TAG_NAME, tag.tag);
extras.putString(TagViewFragment.EXTRA_TAG_UUID, tag.uuid.toString());
extras.putString(TagViewFragment.EXTRA_TAG_UUID, tag.uuid);
filter.customExtras = extras;
return filter;

@ -50,7 +50,7 @@ public class FeaturedListFilterExposer extends TagFilterExposer {
ContentValues contentValues = new ContentValues();
contentValues.put(Metadata.KEY.name, TaskToTagMetadata.KEY);
contentValues.put(TaskToTagMetadata.TAG_NAME.name, tag.tag);
contentValues.put(TaskToTagMetadata.TAG_UUID.name, tag.uuid.toString());
contentValues.put(TaskToTagMetadata.TAG_UUID.name, tag.uuid);
FilterWithUpdate filter = new FilterWithUpdate(tag.tag,
title, tagTemplate,
@ -64,7 +64,7 @@ public class FeaturedListFilterExposer extends TagFilterExposer {
Bundle extras = new Bundle();
extras.putString(TagViewFragment.EXTRA_TAG_NAME, tag.tag);
extras.putString(TagViewFragment.EXTRA_TAG_UUID, tag.uuid.toString());
extras.putString(TagViewFragment.EXTRA_TAG_UUID, tag.uuid);
filter.customExtras = extras;
return filter;

@ -1271,7 +1271,7 @@ public final class TaskEditFragment extends SherlockFragment implements
// stick our task into the outState
outState.putParcelable(TASK_IN_PROGRESS, model);
outState.putString(TASK_UUID, uuid.toString());
outState.putString(TASK_UUID, uuid);
}
private void adjustInfoPopovers() {

@ -249,7 +249,7 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
}
}
public int adjustFilterCount(Filter filter, int delta) {
public void adjustFilterCount(Filter filter, int delta) {
int filterCount = 0;
if (filterCounts.containsKey(filter)) {
filterCount = filterCounts.get(filter);
@ -257,7 +257,6 @@ public class FilterAdapter extends ArrayAdapter<Filter> {
int newCount = Math.max(filterCount + delta, 0);
filterCounts.put(filter, newCount);
notifyDataSetChanged();
return newCount;
}
public void incrementFilterCount(Filter filter) {

@ -278,8 +278,7 @@ public class Astrid2To3UpgradeHelper {
if (data.upgradeNotes == null) {
data.upgradeNotes = new StringBuilder();
}
data.upgradeNotes.append("Goal Deadline: " +
DateUtilities.getDateString(new Date(preferredDueDate)));
data.upgradeNotes.append("Goal Deadline: ").append(DateUtilities.getDateString(new Date(preferredDueDate)));
}
} else if (property == Task.REMINDER_PERIOD) {
// old period was stored in seconds

Loading…
Cancel
Save