aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/network
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-17 14:00:25 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-17 14:00:25 +0200
commit2b19a8b4640eb6edfbee82d8bd1409ed440f83ee (patch)
tree4d11a406968937239a0d7e06caec19b0c7d8e19a /main/src/cgeo/geocaching/network
parent6535dcb0044be778995a4f21b4bfbcfd81e1f888 (diff)
downloadcgeo-2b19a8b4640eb6edfbee82d8bd1409ed440f83ee.zip
cgeo-2b19a8b4640eb6edfbee82d8bd1409ed440f83ee.tar.gz
cgeo-2b19a8b4640eb6edfbee82d8bd1409ed440f83ee.tar.bz2
Refactoring: use isSuccess() when possible
Diffstat (limited to 'main/src/cgeo/geocaching/network')
-rw-r--r--main/src/cgeo/geocaching/network/Network.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index e9e512f..3f06188 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -307,7 +307,7 @@ public abstract class Network {
public static JSONObject requestJSON(final String uri, final Parameters params) {
final HttpResponse response = getRequest(uri, params, new Parameters("Accept", "application/json, text/javascript, */*; q=0.01"));
- if (response != null && response.getStatusLine().getStatusCode() == 200) {
+ if (isSuccess(response)) {
try {
return new JSONObject(Network.getResponseData(response));
} catch (final JSONException e) {