Changeset 9855 in josm
- Timestamp:
- 2016-02-23T08:53:05+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/routines/AbstractValidator.java
r7937 r9855 9 9 10 10 private String errorMessage; 11 private String fix;12 11 13 12 /** … … 33 32 this.errorMessage = errorMessage; 34 33 } 35 36 /**37 * Replies the fixed value, if any.38 * @return the fixed value or {@code null}39 */40 public final String getFix() {41 return fix;42 }43 44 /**45 * Sets the fixed value.46 * @param fix the fixed value, if any47 */48 protected final void setFix(String fix) {49 this.fix = fix;50 }51 34 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/InternetTags.java
r8846 r9855 7 7 import java.util.regex.Pattern; 8 8 9 import org.openstreetmap.josm.command.ChangePropertyCommand;10 9 import org.openstreetmap.josm.data.osm.Node; 11 10 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 11 import org.openstreetmap.josm.data.osm.Relation; 13 12 import org.openstreetmap.josm.data.osm.Way; 14 import org.openstreetmap.josm.data.validation.FixableTestError;15 13 import org.openstreetmap.josm.data.validation.Severity; 16 14 import org.openstreetmap.josm.data.validation.Test; … … 137 135 } 138 136 String msg = tr("''{0}'': {1}", k, errMsg); 139 String fix = validator.getFix(); 140 if (fix != null) { 141 error = new FixableTestError(this, Severity.WARNING, msg, code, p, 142 new ChangePropertyCommand(p, k, fix)); 143 } else { 144 error = new TestError(this, Severity.WARNING, msg, code, p); 145 } 137 error = new TestError(this, Severity.WARNING, msg, code, p); 146 138 } 147 139 return error;
Note:
See TracChangeset
for help on using the changeset viewer.