Changeset 15133 in josm


Ignore:
Timestamp:
2019-05-28T20:00:36+02:00 (5 months ago)
Author:
GerdP
Message:

see #17765: Further simplify code

File:
1 edited

Legend:

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

    r15132 r15133  
    88import java.util.Collections;
    99import java.util.HashSet;
    10 import java.util.List;
    1110import java.util.Set;
    1211
    13 import org.openstreetmap.josm.data.osm.Node;
    1412import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1513import org.openstreetmap.josm.data.osm.OsmUtils;
     
    195193        }
    196194        // code 1131: other area style ways
    197         if (ElemStyles.hasOnlyAreaElements(w)) {
    198             List<Node> nodes = w.getNodes();
    199             if (nodes.isEmpty()) return; // fix zero nodes bug
     195        if (ElemStyles.hasOnlyAreaElements(w) && !w.getNodes().isEmpty()) {
    200196            errors.add(TestError.builder(this, Severity.WARNING, 1131)
    201197                    .message(tr("Unclosed way"), marktr("Area style way is not closed"), new Object())
Note: See TracChangeset for help on using the changeset viewer.