aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/export/GpxSerializer.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/export/GpxSerializer.java')
-rw-r--r--main/src/cgeo/geocaching/export/GpxSerializer.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java
index fe53f37..8139c76 100644
--- a/main/src/cgeo/geocaching/export/GpxSerializer.java
+++ b/main/src/cgeo/geocaching/export/GpxSerializer.java
@@ -55,7 +55,7 @@ public final class GpxSerializer {
}
- public void writeGPX(List<String> allGeocodesIn, Writer writer, final ProgressListener progressListener) throws IOException {
+ public void writeGPX(final List<String> allGeocodesIn, final Writer writer, final ProgressListener progressListener) throws IOException {
// create a copy of the geocode list, as we need to modify it, but it might be immutable
final ArrayList<String> allGeocodes = new ArrayList<>(allGeocodesIn);
@@ -88,7 +88,7 @@ public final class GpxSerializer {
gpx.endDocument();
}
- private void exportBatch(final XmlSerializer gpx, Collection<String> geocodesOfBatch) throws IOException {
+ private void exportBatch(final XmlSerializer gpx, final Collection<String> geocodesOfBatch) throws IOException {
final Set<Geocache> caches = DataStore.loadCaches(geocodesOfBatch, LoadFlags.LOAD_ALL_DB_ONLY);
for (final Geocache cache : caches) {
if (cache == null) {
@@ -174,11 +174,10 @@ public final class GpxSerializer {
}
/**
- * @param boolFlag
* @return XML schema compliant boolean representation of the boolean flag. This must be either true, false, 0 or 1,
* but no other value (also not upper case True/False).
*/
- private static String gpxBoolean(boolean boolFlag) {
+ private static String gpxBoolean(final boolean boolFlag) {
return boolFlag ? "true" : "false";
}
@@ -255,7 +254,7 @@ public final class GpxSerializer {
}
private void writeLogs(final Geocache cache) throws IOException {
- List<LogEntry> logs = cache.getLogs();
+ final List<LogEntry> logs = cache.getLogs();
if (logs.isEmpty()) {
return;
}
@@ -291,7 +290,7 @@ public final class GpxSerializer {
}
private void writeTravelBugs(final Geocache cache) throws IOException {
- List<Trackable> inventory = cache.getInventory();
+ final List<Trackable> inventory = cache.getInventory();
if (CollectionUtils.isEmpty(inventory)) {
return;
}
@@ -338,7 +337,7 @@ public final class GpxSerializer {
return getLocationPart(cache, 0);
}
- private static String getLocationPart(final Geocache cache, int partIndex) {
+ private static String getLocationPart(final Geocache cache, final int partIndex) {
final String location = cache.getLocation();
if (StringUtils.contains(location, ", ")) {
final String[] parts = StringUtils.split(location, ',');
@@ -350,7 +349,7 @@ public final class GpxSerializer {
}
public static String getCountry(final Geocache cache) {
- String country = getLocationPart(cache, 1);
+ final String country = getLocationPart(cache, 1);
if (StringUtils.isNotEmpty(country)) {
return country;
}