Changeset 17720 in josm for trunk/src/org
- Timestamp:
- 2021-04-09T00:55:40+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/ChangesetDiscussionComment.java
r11878 r17720 2 2 package org.openstreetmap.josm.data.osm; 3 3 4 import java.util.Date; 5 6 import org.openstreetmap.josm.tools.date.DateUtils; 4 import java.time.Instant; 7 5 8 6 /** … … 13 11 14 12 /** date this comment was posted at */ 15 private final Datedate;13 private final Instant date; 16 14 /** the user who posted the comment */ 17 15 private final User user; … … 24 22 * @param user the user who posted the comment 25 23 */ 26 public ChangesetDiscussionComment( Datedate, User user) {27 this.date = DateUtils.cloneDate(date);24 public ChangesetDiscussionComment(Instant date, User user) { 25 this.date = date; 28 26 this.user = user; 29 27 } … … 49 47 * @return date this comment was posted at 50 48 */ 51 public final DategetDate() {52 return DateUtils.cloneDate(date);49 public final Instant getDate() { 50 return date; 53 51 } 54 52 -
trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
r17717 r17720 9 9 import java.nio.charset.StandardCharsets; 10 10 import java.text.MessageFormat; 11 import java. util.Date;11 import java.time.Instant; 12 12 import java.util.LinkedList; 13 13 import java.util.List; … … 172 172 // -- date 173 173 String value = atts.getValue("date"); 174 Date date = null; 175 if (value != null) { 176 date = DateUtils.fromString(value); 177 } 178 174 Instant date = value != null ? DateUtils.parseInstant(value) : null; 179 175 comment = new ChangesetDiscussionComment(date, createUser(atts)); 180 176 }
Note:
See TracChangeset
for help on using the changeset viewer.