Changeset 11062 in josm for trunk


Ignore:
Timestamp:
2016-09-27T20:52:25+02:00 (3 years ago)
Author:
simon04
Message:

fix #13643 - NoSuchElementException in DuplicateNode.isFixable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r11007 r11062  
    390390        if (testError.getCode() == DUPLICATE_NODE) return false;
    391391        // cannot merge nodes outside download area
    392         if (testError.getPrimitives().iterator().next().isOutsideDownloadArea()) return false;
     392        final Iterator<? extends OsmPrimitive> it = testError.getPrimitives().iterator();
     393        if (!it.hasNext() || it.next().isOutsideDownloadArea()) return false;
    393394        // everything else is ok to merge
    394395        return true;
Note: See TracChangeset for help on using the changeset viewer.