aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-03-19 18:42:16 +0100
committerBananeweizen <bananeweizen@gmx.de>2014-03-19 18:42:16 +0100
commita3f291785cbf8ea41533bd0bfee947025695baec (patch)
tree89c0e30e6cd4c8acd27fced4b4ce99905c8b4aba
parentaf48c9ef5e918b9eb3a3cc7d825483401f455935 (diff)
downloadcgeo-a3f291785cbf8ea41533bd0bfee947025695baec.zip
cgeo-a3f291785cbf8ea41533bd0bfee947025695baec.tar.gz
cgeo-a3f291785cbf8ea41533bd0bfee947025695baec.tar.bz2
fix compiler warnings
* nullness * unnecessary else * wrong javadoc
-rw-r--r--main/src/cgeo/geocaching/DataStore.java48
-rw-r--r--main/src/cgeo/geocaching/sensors/GeoDirHandler.java3
2 files changed, 26 insertions, 25 deletions
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java
index 0585923..29531df 100644
--- a/main/src/cgeo/geocaching/DataStore.java
+++ b/main/src/cgeo/geocaching/DataStore.java
@@ -25,6 +25,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
+
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
import rx.functions.Func0;
@@ -149,19 +150,19 @@ public class DataStore {
private static SQLiteDatabase database = null;
private static final int dbVersion = 68;
public static final int customListIdOffset = 10;
- private static final String dbName = "data";
- private static final String dbTableCaches = "cg_caches";
- private static final String dbTableLists = "cg_lists";
- private static final String dbTableAttributes = "cg_attributes";
- private static final String dbTableWaypoints = "cg_waypoints";
- private static final String dbTableSpoilers = "cg_spoilers";
- private static final String dbTableLogs = "cg_logs";
- private static final String dbTableLogCount = "cg_logCount";
- private static final String dbTableLogImages = "cg_logImages";
- private static final String dbTableLogsOffline = "cg_logs_offline";
- private static final String dbTableTrackables = "cg_trackables";
- private static final String dbTableSearchDestionationHistory = "cg_search_destination_history";
- private static final String dbCreateCaches = ""
+ private static final @NonNull String dbName = "data";
+ private static final @NonNull String dbTableCaches = "cg_caches";
+ private static final @NonNull String dbTableLists = "cg_lists";
+ private static final @NonNull String dbTableAttributes = "cg_attributes";
+ private static final @NonNull String dbTableWaypoints = "cg_waypoints";
+ private static final @NonNull String dbTableSpoilers = "cg_spoilers";
+ private static final @NonNull String dbTableLogs = "cg_logs";
+ private static final @NonNull String dbTableLogCount = "cg_logCount";
+ private static final @NonNull String dbTableLogImages = "cg_logImages";
+ private static final @NonNull String dbTableLogsOffline = "cg_logs_offline";
+ private static final @NonNull String dbTableTrackables = "cg_trackables";
+ private static final @NonNull String dbTableSearchDestionationHistory = "cg_search_destination_history";
+ private static final @NonNull String dbCreateCaches = ""
+ "create table " + dbTableCaches + " ("
+ "_id integer primary key autoincrement, "
+ "updated long not null, "
@@ -2187,18 +2188,17 @@ public class DataStore {
null,
new HashSet<String>(),
GET_STRING_0);
- } else {
- return queryToColl(dbTableCaches,
- new String[]{"geocode"},
- selection.toString(),
- selectionArgs,
- null,
- null,
- "geocode",
- null,
- new HashSet<String>(),
- GET_STRING_0);
}
+ return queryToColl(dbTableCaches,
+ new String[] { "geocode" },
+ selection.toString(),
+ selectionArgs,
+ null,
+ null,
+ "geocode",
+ null,
+ new HashSet<String>(),
+ GET_STRING_0);
} catch (final Exception e) {
Log.e("DataStore.loadBatchOfStoredGeocodes", e);
return Collections.emptySet();
diff --git a/main/src/cgeo/geocaching/sensors/GeoDirHandler.java b/main/src/cgeo/geocaching/sensors/GeoDirHandler.java
index e0b4da8..4ba555c 100644
--- a/main/src/cgeo/geocaching/sensors/GeoDirHandler.java
+++ b/main/src/cgeo/geocaching/sensors/GeoDirHandler.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.settings.Settings;
import org.apache.commons.lang3.tuple.ImmutablePair;
+
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
@@ -11,7 +12,7 @@ import rx.functions.Action1;
/**
* GeoData and Direction handler.
* <p>
- * To use this class, override {@link #updateGeoDir(IGeoData, Float)}. You need to start the handler using
+ * To use this class, override {@link #updateGeoDir(IGeoData, float)}. You need to start the handler using
* {@link #start()}. A good place to do so might be the {@code onResume} method of the Activity. Stop the Handler
* accordingly in {@code onPause}.
*/