Changeset 3671 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
- Timestamp:
- 2010-11-25T09:45:38+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
r3669 r3671 27 27 public class UnclosedWays extends Test { 28 28 /** The already detected errors */ 29 Bag<Way, Way> _errorWays;29 protected Bag<Way, Way> errorWays; 30 30 31 31 /** … … 39 39 public void startTest(ProgressMonitor monitor) { 40 40 super.startTest(monitor); 41 _errorWays = new Bag<Way, Way>();41 errorWays = new Bag<Way, Way>(); 42 42 } 43 43 44 44 @Override 45 45 public void endTest() { 46 _errorWays = null;46 errorWays = null; 47 47 super.endTest(); 48 48 } … … 74 74 75 75 test = w.get("natural"); 76 if (test != null && !"coastline".equals(test) && !"cliff".equals(test)) 76 if (test != null && !"coastline".equals(test) && !"cliff".equals(test)) { 77 77 set(1101, marktr("natural type {0}"), test); 78 } 78 79 test = w.get("landuse"); 79 if (test != null) 80 if (test != null) { 80 81 set(1102, marktr("landuse type {0}"), test); 82 } 81 83 test = w.get("amenities"); 82 if (test != null) 84 if (test != null) { 83 85 set(1103, marktr("amenities type {0}"), test); 86 } 84 87 test = w.get("sport"); 85 if (test != null && !test.equals("water_slide")) 88 if (test != null && !test.equals("water_slide")) { 86 89 set(1104, marktr("sport type {0}"), test); 90 } 87 91 test = w.get("tourism"); 88 if (test != null) 92 if (test != null) { 89 93 set(1105, marktr("tourism type {0}"), test); 94 } 90 95 test = w.get("shop"); 91 if (test != null) 96 if (test != null) { 92 97 set(1106, marktr("shop type {0}"), test); 98 } 93 99 test = w.get("leisure"); 94 if (test != null) 100 if (test != null) { 95 101 set(1107, marktr("leisure type {0}"), test); 102 } 96 103 test = w.get("waterway"); 97 if (test != null && test.equals("riverbank")) 104 if (test != null && test.equals("riverbank")) { 98 105 set(1108, marktr("waterway type {0}"), test); 106 } 99 107 Boolean btest = OsmUtils.getOsmBoolean(w.get("building")); 100 if (btest != null && btest) 108 if (btest != null && btest) { 101 109 set(1120, marktr("building")); 110 } 102 111 btest = OsmUtils.getOsmBoolean(w.get("area")); 103 if (btest != null && btest) 112 if (btest != null && btest) { 104 113 set(1130, marktr("area")); 114 } 105 115 106 116 if (type != null && !w.isClosed()) { … … 123 133 errors.add(new TestError(this, Severity.WARNING, tr("Unclosed way"), 124 134 type, etype, mode, primitives, highlight)); 125 _errorWays.add(w, w);135 errorWays.add(w, w); 126 136 } 127 137 }
Note:
See TracChangeset
for help on using the changeset viewer.