Changeset 14501 in josm for trunk/src/org


Ignore:
Timestamp:
2018-12-03T12:38:12+01:00 (6 years ago)
Author:
GerdP
Message:

see #17057 : revert changes from r14494

Location:
trunk/src/org/openstreetmap/josm/data/validation/tests
Files:
2 edited

Legend:

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

    r14494 r14501  
    6464    public static final String ROLE_VERIF_PROBLEM_MSG = tr("Role verification problem");
    6565    private boolean ignoreMultiPolygons;
    66     private boolean ignoreTurnRestrictions;
    6766
    6867    /**
     
    110109            if (t instanceof MultipolygonTest) {
    111110                ignoreMultiPolygons = true;
    112             }
    113             if (t instanceof TurnrestrictionTest) {
    114                 ignoreTurnRestrictions = true;
     111                break;
    115112            }
    116113        }
     
    128125        if (ignoreMultiPolygons && n.isMultipolygon()) {
    129126            // see #17010: don't report same problem twice
    130             return;
    131         }
    132         if (ignoreTurnRestrictions && n.hasTag("type","restriction")) {
    133             // see #17057: TurnrestrictionTest is specialized on this
    134127            return;
    135128        }
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java

    r14494 r14501  
    130130            }
    131131        }
    132         final String restriction = r.get("restriction");
    133132        if (morefrom) {
    134             Severity severity = "no_entry".equals(restriction) ? Severity.OTHER : Severity.ERROR;
    135             errors.add(TestError.builder(this, severity, MORE_FROM)
     133            errors.add(TestError.builder(this, Severity.ERROR, MORE_FROM)
    136134                    .message(tr("More than one \"from\" way found"))
    137135                    .primitives(r)
     
    139137        }
    140138        if (moreto) {
    141             Severity severity = "no_exit".equals(restriction) ? Severity.OTHER : Severity.ERROR;
    142             errors.add(TestError.builder(this, severity, MORE_TO)
     139            errors.add(TestError.builder(this, Severity.ERROR, MORE_TO)
    143140                    .message(tr("More than one \"to\" way found"))
    144141                    .primitives(r)
     
    173170        }
    174171        if (fromWay.equals(toWay)) {
    175             Severity severity = "no_u_turn".equals(restriction) ? Severity.OTHER : Severity.WARNING;
     172            Severity severity = r.hasTag("restriction", "no_u_turn") ? Severity.OTHER : Severity.WARNING;
    176173            errors.add(TestError.builder(this, severity, FROM_EQUALS_TO)
    177174                    .message(tr("\"from\" way equals \"to\" way"))
Note: See TracChangeset for help on using the changeset viewer.