Changeset 17166 in josm for trunk/src/org/openstreetmap/josm/io/AbstractReader.java
- Timestamp:
- 2020-10-11T21:29:57+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/AbstractReader.java
r16080 r17166 8 8 import java.io.InputStreamReader; 9 9 import java.text.MessageFormat; 10 import java.time.DateTimeException; 10 11 import java.util.ArrayList; 11 12 import java.util.Collection; … … 45 46 import org.openstreetmap.josm.tools.CheckParameterUtil; 46 47 import org.openstreetmap.josm.tools.Logging; 48 import org.openstreetmap.josm.tools.UncheckedParseException; 47 49 import org.openstreetmap.josm.tools.Utils; 48 50 import org.openstreetmap.josm.tools.date.DateUtils; … … 425 427 426 428 protected final void parseTimestamp(PrimitiveData current, String time) { 427 if (time != null && !time.isEmpty()) { 429 if (time == null || time.isEmpty()) { 430 return; 431 } 432 try { 428 433 int timestamp = timestampCache.computeIfAbsent(time, t -> (int) (DateUtils.tsFromString(t) / 1000)); 429 434 current.setRawTimestamp(timestamp); 435 } catch (UncheckedParseException | DateTimeException e) { 436 Logging.error(e); 430 437 } 431 438 }
Note:
See TracChangeset
for help on using the changeset viewer.