diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-11-09 13:52:00 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-11-09 13:52:00 +0100 |
| commit | b3df57e051885b4819b3b6527400b8de6e2e2a27 (patch) | |
| tree | ae8d13af697186c4ac35c08eb0fc09c6006223d8 /main/src/cgeo/geocaching/export/GpxSerializer.java | |
| parent | 5ab3ede90623babd490ebcce33170d25942136b0 (diff) | |
| download | cgeo-b3df57e051885b4819b3b6527400b8de6e2e2a27.zip cgeo-b3df57e051885b4819b3b6527400b8de6e2e2a27.tar.gz cgeo-b3df57e051885b4819b3b6527400b8de6e2e2a27.tar.bz2 | |
NPE in tests
Diffstat (limited to 'main/src/cgeo/geocaching/export/GpxSerializer.java')
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxSerializer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java index 0ac02e9..3ff8879 100644 --- a/main/src/cgeo/geocaching/export/GpxSerializer.java +++ b/main/src/cgeo/geocaching/export/GpxSerializer.java @@ -12,6 +12,7 @@ import cgeo.geocaching.utils.TextUtils; import cgeo.geocaching.utils.XmlUtils; import cgeo.org.kxml2.io.KXmlSerializer; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.CharEncoding; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.FastDateFormat; @@ -233,7 +234,7 @@ public final class GpxSerializer { private void writeTravelBugs(final Geocache cache) throws IOException { List<Trackable> inventory = cache.getInventory(); - if (inventory.isEmpty()) { + if (CollectionUtils.isEmpty(inventory)) { return; } gpx.startTag(PREFIX_GROUNDSPEAK, "travelbugs"); |
