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


Ignore:
Timestamp:
2018-05-08T15:50:45+02:00 (7 years ago)
Author:
Don-vip
Message:

fix r13717

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r13717 r13720  
    261261            super.load(data);
    262262
    263             WayData wayData = (WayData) data;
    264 
    265             if (!wayData.getNodes().isEmpty() && getDataSet() == null) {
     263            List<Long> nodeIds = ((WayData) data).getNodeIds();
     264
     265            if (!nodeIds.isEmpty() && getDataSet() == null) {
    266266                throw new AssertionError("Data consistency problem - way without dataset detected");
    267267            }
    268268
    269             List<Node> newNodes = new ArrayList<>(wayData.getNodes().size());
    270             for (Long nodeId : wayData.getNodeIds()) {
     269            List<Node> newNodes = new ArrayList<>(nodeIds.size());
     270            for (Long nodeId : nodeIds) {
    271271                Node node = (Node) getDataSet().getPrimitiveById(nodeId, OsmPrimitiveType.NODE);
    272272                if (node != null) {
Note: See TracChangeset for help on using the changeset viewer.