aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/files/GPXParser.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-10-12 16:05:25 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-10-12 16:05:25 +0200
commit7d1fa9ec497e732a0f4123df14427b0e856659dc (patch)
tree53a4cc7e4d264f8cf71f19f05423b2a385b4d9c5 /main/src/cgeo/geocaching/files/GPXParser.java
parent0c6dc58076a81cb8bba31c3ecc414e264c03c7e2 (diff)
downloadcgeo-7d1fa9ec497e732a0f4123df14427b0e856659dc.zip
cgeo-7d1fa9ec497e732a0f4123df14427b0e856659dc.tar.gz
cgeo-7d1fa9ec497e732a0f4123df14427b0e856659dc.tar.bz2
fix findbugs warnings
* synchronize date parsing * use commons date formatting
Diffstat (limited to 'main/src/cgeo/geocaching/files/GPXParser.java')
-rw-r--r--main/src/cgeo/geocaching/files/GPXParser.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/files/GPXParser.java b/main/src/cgeo/geocaching/files/GPXParser.java
index 7d33769..e01c191 100644
--- a/main/src/cgeo/geocaching/files/GPXParser.java
+++ b/main/src/cgeo/geocaching/files/GPXParser.java
@@ -20,6 +20,7 @@ import cgeo.geocaching.list.StoredList;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.MatcherWrapper;
+import cgeo.geocaching.utils.SynchronizedDateFormat;
import org.apache.commons.lang3.StringUtils;
import org.xml.sax.Attributes;
@@ -35,7 +36,6 @@ import android.util.Xml;
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
@@ -47,9 +47,9 @@ import java.util.regex.Pattern;
public abstract class GPXParser extends FileParser {
- private static final SimpleDateFormat formatSimple = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US); // 2010-04-20T07:00:00
- private static final SimpleDateFormat formatSimpleZ = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); // 2010-04-20T07:00:00Z
- private static final SimpleDateFormat formatTimezone = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US); // 2010-04-20T01:01:03-04:00
+ private static final SynchronizedDateFormat formatSimple = new SynchronizedDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.US); // 2010-04-20T07:00:00
+ private static final SynchronizedDateFormat formatSimpleZ = new SynchronizedDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); // 2010-04-20T07:00:00Z
+ private static final SynchronizedDateFormat formatTimezone = new SynchronizedDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US); // 2010-04-20T01:01:03-04:00
/**
* Attention: case sensitive geocode pattern to avoid matching normal words in the name or description of the cache.