diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-01-18 09:15:56 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-01-18 09:15:56 +0100 |
| commit | 3ed5f7f7c37ad01f1e49a091d8e31f0f21994199 (patch) | |
| tree | 7c69b554c7ee3b1c5d3317eed55bd0ef8448e9f3 /main/src/cgeo/geocaching/export/GpxSerializer.java | |
| parent | e8d9746d808daefdafda1468a66fbf0cbb3d7ca5 (diff) | |
| download | cgeo-3ed5f7f7c37ad01f1e49a091d8e31f0f21994199.zip cgeo-3ed5f7f7c37ad01f1e49a091d8e31f0f21994199.tar.gz cgeo-3ed5f7f7c37ad01f1e49a091d8e31f0f21994199.tar.bz2 | |
remove eclipse warnings about potential null pointer
Diffstat (limited to 'main/src/cgeo/geocaching/export/GpxSerializer.java')
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxSerializer.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java index 2afed44..df07f17 100644 --- a/main/src/cgeo/geocaching/export/GpxSerializer.java +++ b/main/src/cgeo/geocaching/export/GpxSerializer.java @@ -90,7 +90,10 @@ public final class GpxSerializer { private void exportBatch(final XmlSerializer gpx, Collection<String> geocodesOfBatch) throws IOException { final Set<Geocache> caches = DataStore.loadCaches(geocodesOfBatch, LoadFlags.LOAD_ALL_DB_ONLY); for (final Geocache cache : caches) { - final Geopoint coords = cache != null ? cache.getCoords() : null; + if (cache == null) { + continue; + } + final Geopoint coords = cache.getCoords(); if (coords == null) { // Export would be invalid without coordinates. continue; |
