Ignore:
Timestamp:
2009-03-18T16:13:41+01:00 (17 years ago)
Author:
stoecker
Message:

close #2302 - patch by jttt - optimizations and encapsulation

File:
1 edited

Legend:

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

    r1494 r1499  
    3333import org.openstreetmap.josm.data.osm.visitor.Visitor;
    3434import org.openstreetmap.josm.gui.PleaseWaitDialog;
     35import org.openstreetmap.josm.tools.DateUtils;
    3536import org.xml.sax.Attributes;
    3637import org.xml.sax.InputSource;
     
    101102               osm.selected = selected;
    102103               osm.deleted = deleted;
    103                osm.timestamp = timestamp;
     104               osm.setTimestamp(getTimestamp());
    104105               osm.user = user;
    105106               osm.visible = visible;
    106107               osm.version = version;
    107                osm.checkTagged();
    108                osm.checkDirectionTagged();
    109108               osm.mappaintStyle = null;
    110109          }
     
    304303          String time = atts.getValue("timestamp");
    305304          if (time != null && time.length() != 0) {
    306                /* Do not parse the date here since it wastes a HUGE amount of time.
    307                 * Moved into OsmPrimitive.
    308                try {
    309                     current.timestamp = DateParser.parse(time);
    310                } catch (ParseException e) {
    311                     e.printStackTrace();
    312                     throw new SAXException(tr("Couldn''t read time format \"{0}\".",time));
    313                }
    314                */
    315                current.timestamp = time;
     305               current.setTimestamp(DateUtils.fromString(time));
    316306          }
    317307
Note: See TracChangeset for help on using the changeset viewer.