diff options
author | Bananeweizen <Bananeweizen@gmx.de> | 2011-12-26 09:31:06 +0100 |
---|---|---|
committer | Bananeweizen <Bananeweizen@gmx.de> | 2011-12-26 09:31:06 +0100 |
commit | 8f749cf471fd30df55c4206d58abe69637988330 (patch) | |
tree | ed112bc2267a5d1439d190ce308193ec6454876d /main/src/cgeo/geocaching/StaticMapsProvider.java | |
parent | 85591bf9a7b727536942d7b9c7afe53fc6a026a4 (diff) | |
download | cgeo-8f749cf471fd30df55c4206d58abe69637988330.zip cgeo-8f749cf471fd30df55c4206d58abe69637988330.tar.gz cgeo-8f749cf471fd30df55c4206d58abe69637988330.tar.bz2 |
refactoring for #908: waypoint list of cache is immutable for clients
and never null
* avoids initializations outside of cache
* avoids tempering with internal data outside of cache
* removes redundant code and null checks
Diffstat (limited to 'main/src/cgeo/geocaching/StaticMapsProvider.java')
-rw-r--r-- | main/src/cgeo/geocaching/StaticMapsProvider.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/StaticMapsProvider.java b/main/src/cgeo/geocaching/StaticMapsProvider.java index 9834681..d37905b 100644 --- a/main/src/cgeo/geocaching/StaticMapsProvider.java +++ b/main/src/cgeo/geocaching/StaticMapsProvider.java @@ -3,7 +3,6 @@ package cgeo.geocaching; import cgeo.geocaching.files.LocalStorage; import cgeo.geocaching.geopoint.GeopointFormatter.Format; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpResponse; @@ -70,7 +69,7 @@ public class StaticMapsProvider { } final StringBuilder waypoints = new StringBuilder(); - if (CollectionUtils.isNotEmpty(cache.getWaypoints())) { + if (cache.hasWaypoints()) { for (cgWaypoint waypoint : cache.getWaypoints()) { if (waypoint.getCoords() == null) { continue; |