Changeset 10755 in josm for trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
- Timestamp:
- 2016-08-07T14:46:57+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
r10378 r10755 38 38 * @since 6390 39 39 */ 40 private class UnclosedWaysCheck {40 private static class UnclosedWaysCheck { 41 41 /** The unique numeric code for this check */ 42 42 public final int code; … … 90 90 * Returns the test error of the given way, if any. 91 91 * @param w The way to check 92 * @param test parent test 92 93 * @return The test error if the way is erroneous, {@code null} otherwise 93 94 */ 94 public final TestError getTestError(Way w ) {95 public final TestError getTestError(Way w, UnclosedWays test) { 95 96 String value = w.get(key); 96 97 if (isValueErroneous(value)) { … … 99 100 String etype = engMessage.contains("{0}") ? MessageFormat.format(engMessage, value) : engMessage; 100 101 // CHECKSTYLE.ON: SingleSpaceSeparator 101 return new TestError( UnclosedWays.this, Severity.WARNING, tr("Unclosed way"),102 return new TestError(test, Severity.WARNING, tr("Unclosed way"), 102 103 type, etype, code, Arrays.asList(w), 103 104 // The important parts of an unclosed way are the first and … … 117 118 * @since 6390 118 119 */ 119 private final class UnclosedWaysBooleanCheck extends UnclosedWaysCheck {120 private static final class UnclosedWaysBooleanCheck extends UnclosedWaysCheck { 120 121 121 122 /** … … 137 138 } 138 139 139 private final UnclosedWaysCheck[] checks = {140 private static final UnclosedWaysCheck[] checks = { 140 141 // CHECKSTYLE.OFF: SingleSpaceSeparator 141 142 new UnclosedWaysCheck(1101, "natural", marktr("natural type {0}"), … … 183 184 184 185 for (UnclosedWaysCheck c : checks) { 185 TestError error = c.getTestError(w );186 TestError error = c.getTestError(w, this); 186 187 if (error != null) { 187 188 errors.add(error);
Note:
See TracChangeset
for help on using the changeset viewer.