Ticket #12111: 12111.patch

File 12111.patch, 1.1 KB (added by simon04, 10 years ago)
  • src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java

    diff --git a/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java b/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java
    index 74278c5..8695531 100644
    a b  
    3838    protected static final int MIX_VIA = 1813;
    3939    protected static final int UNCONNECTED_VIA = 1814;
    4040    protected static final int SUPERFLUOUS = 1815;
     41    protected static final int FROM_EQUALS_TO = 1816;
    4142
    4243    /**
    4344     * Constructs a new {@code TurnrestrictionTest}.
    public void visit(Relation r) {  
    142143            errors.add(new TestError(this, Severity.ERROR, tr("No \"to\" way found"), NO_TO, r));
    143144            return;
    144145        }
     146        if (fromWay.equals(toWay)) {
     147            errors.add(new TestError(this, Severity.OTHER, tr("\"from\" way equals \"to\" way"), FROM_EQUALS_TO, r));
     148        }
    145149        if (via.isEmpty()) {
    146150            errors.add(new TestError(this, Severity.ERROR, tr("No \"via\" node or way found"), NO_VIA, r));
    147151            return;