Ignore:
Timestamp:
2014-05-02T02:54:23+02:00 (6 years ago)
Author:
Don-vip
Message:

sonar - Don't call static DateFormat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r7037 r7049  
    2121
    2222/**
    23  * Read a nmea file. Based on information from
    24  * http://www.kowoma.de/gps/zusatzerklaerungen/NMEA.htm
     23 * Reads a NMEA file. Based on information from
     24 * <a href="http://www.kowoma.de/gps/zusatzerklaerungen/NMEA.htm">http://www.kowoma.de</a>
    2525 *
    2626 * @author cbrill
     
    132132    public GpxData data;
    133133
    134     //  private static final SimpleDateFormat GGATIMEFMT =
    135     //      new SimpleDateFormat("HHmmss.SSS");
    136     private static final SimpleDateFormat RMCTIMEFMT =
    137         new SimpleDateFormat("ddMMyyHHmmss.SSS");
    138     private static final SimpleDateFormat RMCTIMEFMTSTD =
    139         new SimpleDateFormat("ddMMyyHHmmss");
     134    private final SimpleDateFormat rmcTimeFmt = new SimpleDateFormat("ddMMyyHHmmss.SSS");
     135    private final SimpleDateFormat rmcTimeFmtStd = new SimpleDateFormat("ddMMyyHHmmss");
    140136
    141137    private Date readTime(String p) {
    142         Date d = RMCTIMEFMT.parse(p, new ParsePosition(0));
     138        Date d = rmcTimeFmt.parse(p, new ParsePosition(0));
    143139        if (d == null) {
    144             d = RMCTIMEFMTSTD.parse(p, new ParsePosition(0));
     140            d = rmcTimeFmtStd.parse(p, new ParsePosition(0));
    145141        }
    146142        if (d == null)
Note: See TracChangeset for help on using the changeset viewer.