Changeset 4293 in josm
- Timestamp:
- 2011-08-08T00:07:56+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r4219 r4293 6 6 import java.awt.geom.GeneralPath; 7 7 import java.util.ArrayList; 8 import java.util.Arrays; 8 9 import java.util.Collection; 9 10 import java.util.Collections; … … 26 27 import org.openstreetmap.josm.gui.mappaint.ElemStyles; 27 28 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; 28 import org.openstreetmap.josm.gui.mappaint.xml.AreaPrototype;29 29 30 30 public class MultipolygonTest extends Test { … … 118 118 for (ElemStyle s : styles.generateStyles(w, SCALE, null, false).a) { 119 119 if (s instanceof AreaElemStyle) { 120 errors.add( new TestError(this, Severity.WARNING, tr("Area style way is not closed"), NOT_CLOSED, w)); 120 List<Node> nodes = w.getNodes(); 121 errors.add(new TestError(this, Severity.WARNING, tr("Area style way is not closed"), NOT_CLOSED, 122 Collections.singletonList(w), Arrays.asList(nodes.get(0), nodes.get(nodes.size() - 1)))); 121 123 break; 122 124 } … … 216 218 } 217 219 218 if (!nonClosedWays.isEmpty()) { 219 errors.add(new TestError(this, Severity.WARNING, tr("Multipolygon is not closed"), NON_CLOSED_WAY, Collections.singletonList(r), nonClosedWays)); 220 for (List<Node> w : nonClosedWays) { 221 errors.add(new TestError(this, Severity.WARNING, tr("Multipolygon is not closed"), NON_CLOSED_WAY, 222 w, Arrays.asList(w.get(0), w.get(w.size() - 1)))); 220 223 } 221 224
Note:
See TracChangeset
for help on using the changeset viewer.