Changeset 17489 in josm


Ignore:
Timestamp:
2021-02-10T08:45:14+01:00 (4 years ago)
Author:
GerdP
Message:

fix #20455: Raise "Unclosed way - landuse" warnings to errors

  • Raise warning to error for those checks where we know that the tag must describe an area
File:
1 edited

Legend:

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

    r17409 r17489  
    9696            String value = w.get(key);
    9797            if (isValueErroneous(value)) {
    98                 return TestError.builder(test, Severity.WARNING, code)
     98                final Severity severity;
     99                // see #20455: raise severity to error when we are sure that tag key must describe an area
     100                if (ignore && !specialValues.isEmpty()) {
     101                    severity = Severity.WARNING;
     102                } else {
     103                    severity = Severity.ERROR;
     104                }
     105                return TestError.builder(test, severity, code)
    99106                        .message(tr("Unclosed way"), engMessage, engMessage.contains("{0}") ? new Object[]{value} : new Object[]{})
    100107                        .primitives(w)
Note: See TracChangeset for help on using the changeset viewer.