From 84c10bff048fff21d6c7c3c72f9b903956ae4316 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sat, 28 Dec 2013 01:30:20 +0100 Subject: refactoring: remove redundant test --- main/src/cgeo/geocaching/connector/ec/ECApi.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'main') 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 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) { -- cgit v1.1