aboutsummaryrefslogtreecommitdiffstats
path: root/src/cgeo/geocaching/cgDirectionImg.java
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2011-09-03 11:44:37 -0700
committerBananeweizen <Bananeweizen@gmx.de>2011-09-03 11:44:37 -0700
commit5878215750b36147e31d4e44d39f5cee5a686a24 (patch)
tree05ed634bef7aa97c6aef53dca0bae8947b790669 /src/cgeo/geocaching/cgDirectionImg.java
parent1ca5b0ddbe8ecaa67b1606f386ae398c0bf8da10 (diff)
parent5d6cd5f76c3682f70e4fa18182849fb2110a6aca (diff)
downloadcgeo-5878215750b36147e31d4e44d39f5cee5a686a24.zip
cgeo-5878215750b36147e31d4e44d39f5cee5a686a24.tar.gz
cgeo-5878215750b36147e31d4e44d39f5cee5a686a24.tar.bz2
Merge pull request #359 from gezb/301
Fix for issue #301 - include Apache commons lang library
Diffstat (limited to 'src/cgeo/geocaching/cgDirectionImg.java')
-rw-r--r--src/cgeo/geocaching/cgDirectionImg.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cgeo/geocaching/cgDirectionImg.java b/src/cgeo/geocaching/cgDirectionImg.java
index 573cf47..1f513d3 100644
--- a/src/cgeo/geocaching/cgDirectionImg.java
+++ b/src/cgeo/geocaching/cgDirectionImg.java
@@ -5,6 +5,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
@@ -20,11 +21,11 @@ public class cgDirectionImg {
String dirName;
String fileName;
- if (geocode == null || geocode.length() == 0 || code == null || code.length() == 0) {
+ if (StringUtils.isBlank(geocode) || StringUtils.isBlank(code)) {
return;
}
- if (geocode != null && geocode.length() > 0) {
+ if (StringUtils.isNotBlank(geocode)) {
dirName = cgSettings.getStorage() + geocode + "/";
fileName = cgSettings.getStorage() + geocode + "/direction.png";
} else {