Changeset 2086 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2009-09-09T17:46:09+02:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3443: Illegal value for attribute 'version' when loading OSM file

File:
1 edited

Legend:

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

    r2078 r2086  
    395395                    throwException(tr("Illegal value for attribute ''version'' on OSM primitive with id {0}. Got {1}", Long.toString(current.id), version));
    396396                }
    397                 if (current.version <= 0) {
     397                if (current.version <= 0 && current.id > 0) {
    398398                    throwException(tr("Illegal value for attribute ''version'' on OSM primitive with id {0}. Got {1}", Long.toString(current.id), version));
     399                } else if (current.version < 0 && current.id  <=0) {
     400                    System.out.println(tr("WARNING: normalizing value of attribute ''version'' of element {0} to 0. Got {1}", current.id, current.version));
     401                    current.version = 0;
    399402                }
    400403            } else {
Note: See TracChangeset for help on using the changeset viewer.