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


Ignore:
Timestamp:
2018-05-13T23:05:26+02:00 (17 months ago)
Author:
Don-vip
Message:

see #16258 - changeset attribute can now be missing

File:
1 edited

Legend:

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

    r10841 r13762  
    108108        long id = getMandatoryAttributeLong(atts, "id");
    109109        long version = getMandatoryAttributeLong(atts, "version");
    110         long changesetId = getMandatoryAttributeLong(atts, "changeset");
     110        Long changeset = getAttributeLong(atts, "changeset");
     111        long changesetId = changeset != null ? changeset : 0L;
    111112        boolean visible = getMandatoryAttributeBoolean(atts, "visible");
    112113
     
    132133            Double lon = getAttributeDouble(atts, "lon");
    133134            LatLon coor = (lat != null && lon != null) ? new LatLon(lat, lon) : null;
    134             primitive = new HistoryNode(id, version, visible, user, changesetId, timestamp, coor);
     135            primitive = new HistoryNode(id, version, visible, user, changesetId, timestamp, coor, changeset != null);
    135136
    136137        } else if (type.equals(OsmPrimitiveType.WAY)) {
    137             primitive = new HistoryWay(id, version, visible, user, changesetId, timestamp);
     138            primitive = new HistoryWay(id, version, visible, user, changesetId, timestamp, changeset != null);
    138139        } else if (type.equals(OsmPrimitiveType.RELATION)) {
    139             primitive = new HistoryRelation(id, version, visible, user, changesetId, timestamp);
     140            primitive = new HistoryRelation(id, version, visible, user, changesetId, timestamp, changeset != null);
    140141        }
    141142        return primitive;
Note: See TracChangeset for help on using the changeset viewer.