Ignore:
Timestamp:
2009-11-08T15:19:50+01:00 (17 years ago)
Author:
jttt
Message:

Add clearId parameter to primitives copy constructor, replace some clearOsmId calls, throw exception if id is set after primitive was added to the dataset

File:
1 edited

Legend:

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

    r2398 r2410  
    9292
    9393        public void copyTo(OsmPrimitive osm) {
    94             //  id < 0 possible if read from a file
    95             if (id <= 0) {
    96                 osm.clearOsmId();
    97             } else {
     94            // It's not necessary to call clearOsmId for id < 0. The same thing is done by parameterless constructor
     95            if (id > 0) {
    9896                osm.setOsmId(id, version);
    9997            }
Note: See TracChangeset for help on using the changeset viewer.