Changeset 14721 in josm


Ignore:
Timestamp:
2019-01-23T07:35:49+01:00 (3 weeks ago)
Author:
GerdP
Message:

fix PMD issue: The final local variable name 'ERR_TYPE_SPACE' doesn't match '[a-z][a-zA-Z0-9]*'.

File:
1 edited

Legend:

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

    r14706 r14721  
    550550            withErrors.put(p, "EV");
    551551        }
    552         final String ERR_TYPE_SPACE = "SPACE";
    553         if ((value.startsWith(" ") || value.endsWith(" ")) && !withErrors.contains(p, ERR_TYPE_SPACE)) {
     552        final String errTypeSpace = "SPACE";
     553        if ((value.startsWith(" ") || value.endsWith(" ")) && !withErrors.contains(p, errTypeSpace)) {
    554554            errors.add(TestError.builder(this, Severity.WARNING, INVALID_SPACE)
    555555                    .message(tr("Property values start or end with white space"), s, key)
    556556                    .primitives(p)
    557557                    .build());
    558             withErrors.put(p, ERR_TYPE_SPACE);
    559         }
    560         if (value.contains("  ") && !withErrors.contains(p, ERR_TYPE_SPACE)) {
     558            withErrors.put(p, errTypeSpace);
     559        }
     560        if (value.contains("  ") && !withErrors.contains(p, errTypeSpace)) {
    561561            errors.add(TestError.builder(this, Severity.WARNING, MULTIPLE_SPACES)
    562562                    .message(tr("Property values contain multiple white spaces"), s, key)
    563563                    .primitives(p)
    564564                    .build());
    565             withErrors.put(p, ERR_TYPE_SPACE);
     565            withErrors.put(p, errTypeSpace);
    566566        }
    567567        if (!value.equals(Entities.unescape(value)) && !withErrors.contains(p, "HTML")) {
Note: See TracChangeset for help on using the changeset viewer.