Changeset 17722 in josm for trunk/src/org


Ignore:
Timestamp:
2021-04-09T01:24:26+02:00 (3 years ago)
Author:
simon04
Message:

see #14176 - Fix Instant writing in GpsWriter

File:
1 edited

Legend:

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

    r16953 r17722  
    99import java.io.PrintWriter;
    1010import java.nio.charset.StandardCharsets;
     11import java.time.Instant;
    1112import java.util.ArrayList;
    1213import java.util.Collection;
     
    170171                    Object val = obj.get(key);
    171172                    if (val instanceof Date) {
    172                         simpleTag(key, DateUtils.fromDate((Date) val));
     173                        throw new IllegalStateException();
     174                    } else if (val instanceof Instant) {
     175                        simpleTag(key, String.valueOf(val));
    173176                    } else if (val instanceof Number) {
    174177                        simpleTag(key, val.toString());
Note: See TracChangeset for help on using the changeset viewer.