Changeset 11553 in josm for trunk/src/org/openstreetmap/josm/io/NmeaReader.java
- Timestamp:
- 2017-02-12T16:32:18+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r11374 r11553 13 13 import java.util.Collections; 14 14 import java.util.Date; 15 import java.util.Optional; 15 16 16 17 import org.openstreetmap.josm.Main; … … 112 113 113 114 private Date readTime(String p) { 114 Date d = rmcTimeFmt.parse(p, new ParsePosition(0)); 115 if (d == null) { 116 d = rmcTimeFmtStd.parse(p, new ParsePosition(0)); 117 } 115 Date d = Optional.ofNullable(rmcTimeFmt.parse(p, new ParsePosition(0))) 116 .orElseGet(() -> rmcTimeFmtStd.parse(p, new ParsePosition(0))); 118 117 if (d == null) 119 118 throw new JosmRuntimeException("Date is malformed");
Note:
See TracChangeset
for help on using the changeset viewer.
