Changeset 5012 in josm for trunk


Ignore:
Timestamp:
2012-02-21T18:04:49+01:00 (8 years ago)
Author:
akks
Message:

tried to fix 0-node way validation bug, see #7437

File:
1 edited

Legend:

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

    r4806 r5012  
    118118        if (!w.isClosed() && ElemStyles.hasAreaElemStyle(w, false)) {
    119119            List<Node> nodes = w.getNodes();
     120            if (nodes.size()<1) return; // fix zero nodes bug
    120121            errors.add(new TestError(this, Severity.WARNING, tr("Area style way is not closed"), NOT_CLOSED,
    121122                    Collections.singletonList(w), Arrays.asList(nodes.get(0), nodes.get(nodes.size() - 1))));
     
    197198            List<Node> openNodes = new LinkedList<Node>();
    198199            for (List<Node> w : nonClosedWays) {
     200                if (w.size()<1) continue;
    199201                openNodes.add(w.get(0));
    200202                openNodes.add(w.get(w.size() - 1));
Note: See TracChangeset for help on using the changeset viewer.