aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/StoredList.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/StoredList.java')
-rw-r--r--main/src/cgeo/geocaching/StoredList.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/StoredList.java b/main/src/cgeo/geocaching/StoredList.java
index 4946420..e080af9 100644
--- a/main/src/cgeo/geocaching/StoredList.java
+++ b/main/src/cgeo/geocaching/StoredList.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.utils.RunnableWithArgument;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
import android.app.Activity;
import android.app.AlertDialog;
@@ -78,10 +79,6 @@ public final class StoredList {
public void promptForListSelection(final int titleId, final RunnableWithArgument<Integer> runAfterwards, final boolean onlyConcreteLists, final int exceptListId, final String newListName) {
final List<StoredList> lists = getSortedLists();
- if (lists == null) {
- return;
- }
-
if (exceptListId > StoredList.TEMPORARY_LIST_ID) {
StoredList exceptList = cgData.getList(exceptListId);
if (exceptList != null) {
@@ -122,7 +119,8 @@ public final class StoredList {
builder.create().show();
}
- private static List<StoredList> getSortedLists() {
+ private static @NonNull
+ List<StoredList> getSortedLists() {
final Collator collator = Collator.getInstance();
final List<StoredList> lists = cgData.getLists();
Collections.sort(lists, new Comparator<StoredList>() {