Ignore:
Timestamp:
2017-04-15T01:38:46+02:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1192 - String literals should not be duplicated

File:
1 edited

Legend:

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

    r11893 r11913  
    22package org.openstreetmap.josm.data.validation.tests;
    33
     4import static org.openstreetmap.josm.data.validation.tests.CrossingWays.HIGHWAY;
     5import static org.openstreetmap.josm.data.validation.tests.CrossingWays.RAILWAY;
     6import static org.openstreetmap.josm.data.validation.tests.CrossingWays.WATERWAY;
    47import static org.openstreetmap.josm.tools.I18n.tr;
    58
     
    99102
    100103    private static final String[] TYPES = {
    101             "none", "highway", "railway", "waterway", "boundary", "power", "natural", "landuse", "building"};
     104            "none", HIGHWAY, RAILWAY, WATERWAY, "boundary", "power", "natural", "landuse", "building"};
    102105
    103106    /** The map of potential duplicates.
     
    210213                            .primitives(primitives)
    211214                            .build());
    212                 } else if (typeMap.get("highway")) {
     215                } else if (typeMap.get(HIGHWAY)) {
    213216                    errors.add(TestError.builder(parentTest, Severity.ERROR, DUPLICATE_NODE_HIGHWAY)
    214217                            .message(tr("Highway duplicated nodes"))
    215218                            .primitives(primitives)
    216219                            .build());
    217                 } else if (typeMap.get("railway")) {
     220                } else if (typeMap.get(RAILWAY)) {
    218221                    errors.add(TestError.builder(parentTest, Severity.ERROR, DUPLICATE_NODE_RAILWAY)
    219222                            .message(tr("Railway duplicated nodes"))
    220223                            .primitives(primitives)
    221224                            .build());
    222                 } else if (typeMap.get("waterway")) {
     225                } else if (typeMap.get(WATERWAY)) {
    223226                    errors.add(TestError.builder(parentTest, Severity.ERROR, DUPLICATE_NODE_WATERWAY)
    224227                            .message(tr("Waterway duplicated nodes"))
Note: See TracChangeset for help on using the changeset viewer.