From 7f091c62a83cd0e048a7f02d3b8320424dd4f44a Mon Sep 17 00:00:00 2001 From: ligi Date: Sun, 3 May 2015 02:20:17 +0200 Subject: [PATCH] Do an assertion here to get rid of a warning - this can not be null --- src/main/java/org/ligi/passandroid/model/PastLocationsStore.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/ligi/passandroid/model/PastLocationsStore.java b/src/main/java/org/ligi/passandroid/model/PastLocationsStore.java index e8573192..ddbc094a 100644 --- a/src/main/java/org/ligi/passandroid/model/PastLocationsStore.java +++ b/src/main/java/org/ligi/passandroid/model/PastLocationsStore.java @@ -30,6 +30,7 @@ public class PastLocationsStore { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); final Set pastLocations = prefs.getStringSet(KEY_PAST_LOCATIONS, new HashSet()); + assert pastLocations != null; if (pastLocations.size() >= MAX_ELEMENTS) { deleteOneElementFromSet(pastLocations); }