From c7aae88d83016c3c9f7740b11227618f45a95e7b Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Thu, 12 Sep 2013 21:00:54 +0200 Subject: refactoring: workaround for null analysis * Eclipse will not compile the following if statements otherwise --- main/src/cgeo/geocaching/connector/gc/GCParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/src/cgeo/geocaching/connector/gc/GCParser.java') diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java index 3885679..7eacb8e 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCParser.java +++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java @@ -309,7 +309,7 @@ public abstract class GCParser { final String coordinates = Network.getResponseData(Network.postRequest("http://www.geocaching.com/seek/nearest.aspx", params), false); if (StringUtils.isNotBlank(coordinates)) { - if (coordinates.contains("You have not agreed to the license agreement. The license agreement is required before you can start downloading GPX or LOC files from Geocaching.com")) { + if (coordinates != null && coordinates.contains("You have not agreed to the license agreement. The license agreement is required before you can start downloading GPX or LOC files from Geocaching.com")) { Log.i("User has not agreed to the license agreement. Can\'t download .loc file."); searchResult.setError(StatusCode.UNAPPROVED_LICENSE); -- cgit v1.1