aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-12-28 01:30:20 +0100
committerSamuel Tardieu <sam@rfc1149.net>2013-12-28 01:31:57 +0100
commit84c10bff048fff21d6c7c3c72f9b903956ae4316 (patch)
tree7043df6525f3366df2f2c36a94a45a7745b359ee /main
parent732a1cfccdd472efcea21e0100fc71d71f4c8cdc (diff)
downloadcgeo-84c10bff048fff21d6c7c3c72f9b903956ae4316.zip
cgeo-84c10bff048fff21d6c7c3c72f9b903956ae4316.tar.gz
cgeo-84c10bff048fff21d6c7c3c72f9b903956ae4316.tar.bz2
refactoring: remove redundant test
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/connector/ec/ECApi.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/connector/ec/ECApi.java b/main/src/cgeo/geocaching/connector/ec/ECApi.java
index f91bcdb..fe93846 100644
--- a/main/src/cgeo/geocaching/connector/ec/ECApi.java
+++ b/main/src/cgeo/geocaching/connector/ec/ECApi.java
@@ -156,7 +156,6 @@ public class ECApi {
}
private static List<Geocache> importCachesFromJSON(final HttpResponse response) {
-
if (response != null) {
try {
final String data = Network.getResponseDataAlways(response);
@@ -179,7 +178,6 @@ public class ECApi {
}
return Collections.emptyList();
-
}
private static Geocache parseCache(final JSONObject response) {
@@ -192,7 +190,7 @@ public class ECApi {
cache.setType(getCacheType(response.getString("type")));
cache.setDifficulty((float) response.getDouble("difficulty"));
cache.setTerrain((float) response.getDouble("terrain"));
- cache.setFound(response.getInt("found") == 1 ? true : false);
+ cache.setFound(response.getInt("found") == 1);
DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_CACHE));
} catch (final JSONException e) {