Ignore:
Timestamp:
2019-04-20T19:38:30+02:00 (5 years ago)
Author:
GerdP
Message:

fix #17567: apply 17567-rephrase.patch

File:
1 edited

Legend:

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

    r14974 r15003  
    2929    protected static final int MORE_FROM = 1805;
    3030    protected static final int MORE_TO = 1806;
    31     protected static final int UNKNOWN_ROLE = 1807;
    32     protected static final int UNKNOWN_TYPE = 1808;
     31    protected static final int UNEXPECTED_ROLE = 1807;
     32    protected static final int UNEXPECTED_TYPE = 1808;
    3333    protected static final int FROM_VIA_NODE = 1809;
    3434    protected static final int TO_VIA_NODE = 1810;
     
    115115                    break;
    116116                default:
    117                     errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE)
    118                             .message(tr("Unknown role in restriction"))
     117                    errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_ROLE)
     118                            .message(tr("Unexpected role ''{0}'' in restriction", m.getRole()))
    119119                            .primitives(l)
    120120                            .highlight(m.getMember())
     
    123123            } else if (m.isNode()) {
    124124                Node n = m.getNode();
    125                 switch (m.getRole()) {
    126                 case "via":
     125                if ("via".equals(m.getRole())) {
    127126                    if (!via.isEmpty()) {
    128127                        if (via.get(0) instanceof Node) {
     
    134133                        via.add(n);
    135134                    }
    136                     break;
    137                 case "location_hint":
    138                     errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE)
    139                             .message(tr("Role ''{0}'' is not in templates", m.getRole()))
    140                             .primitives(l)
    141                             .highlight(m.getMember())
    142                             .build());
    143                     break;
    144                 default:
    145                     errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_ROLE)
    146                             .message(tr("Unknown role in restriction"))
     135                } else {
     136                    errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_ROLE)
     137                            .message(tr("Unexpected role ''{0}'' in restriction", m.getRole()))
    147138                            .primitives(l)
    148139                            .highlight(m.getMember())
     
    150141                }
    151142            } else {
    152                 errors.add(TestError.builder(this, Severity.WARNING, UNKNOWN_TYPE)
    153                         .message(tr("Unknown member type"))
     143                errors.add(TestError.builder(this, Severity.WARNING, UNEXPECTED_TYPE)
     144                        .message(tr("Unexpected member type in restriction"))
    154145                        .primitives(l)
    155146                        .highlight(m.getMember())
Note: See TracChangeset for help on using the changeset viewer.