aboutsummaryrefslogtreecommitdiffstats
path: root/src/cgeo/geocaching/sorting/GeocodeComparator.java
diff options
context:
space:
mode:
authorGerald Barker <geraldbarker@gmail.com>2011-09-02 23:19:51 +0100
committerGerald Barker <geraldbarker@gmail.com>2011-09-02 23:19:51 +0100
commit53936c7ee6654a525075b03e1b4c8ddbfbcd4ef5 (patch)
tree41154be6daecad1b4483223d72920e0a290024ef /src/cgeo/geocaching/sorting/GeocodeComparator.java
parentafbe8c5164e1157e38e0f8c4b28942cbd9fe3d41 (diff)
downloadcgeo-53936c7ee6654a525075b03e1b4c8ddbfbcd4ef5.zip
cgeo-53936c7ee6654a525075b03e1b4c8ddbfbcd4ef5.tar.gz
cgeo-53936c7ee6654a525075b03e1b4c8ddbfbcd4ef5.tar.bz2
First commit of Apache Commons String & Date functions and required, and
refactor of code to use them.
Diffstat (limited to 'src/cgeo/geocaching/sorting/GeocodeComparator.java')
-rw-r--r--src/cgeo/geocaching/sorting/GeocodeComparator.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cgeo/geocaching/sorting/GeocodeComparator.java b/src/cgeo/geocaching/sorting/GeocodeComparator.java
index dd16f08..957545b 100644
--- a/src/cgeo/geocaching/sorting/GeocodeComparator.java
+++ b/src/cgeo/geocaching/sorting/GeocodeComparator.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.sorting;
+import org.apache.commons.lang3.StringUtils;
+
import cgeo.geocaching.cgCache;
/**
@@ -10,8 +12,8 @@ public class GeocodeComparator extends AbstractCacheComparator {
@Override
protected boolean canCompare(cgCache cache1, cgCache cache2) {
- return cache1.geocode != null && cache1.geocode.length() > 0
- && cache2.geocode != null && cache2.geocode.length() > 0;
+ return StringUtils.isNotBlank(cache1.geocode)
+ && StringUtils.isNotBlank(cache2.geocode);
}
@Override