Ignore:
Timestamp:
2015-06-03T14:05:30+02:00 (9 years ago)
Author:
Don-vip
Message:

global use of String.isEmpty()

File:
1 edited

Legend:

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

    r8444 r8461  
    177177                boolean isFirstLine = true;
    178178                String line;
    179                 while ((line = reader.readLine()) != null && (tagcheckerfile || line.length() != 0)) {
     179                while ((line = reader.readLine()) != null && (tagcheckerfile || !line.isEmpty())) {
    180180                    if (line.startsWith("#")) {
    181181                        if (line.startsWith("# JOSM TagChecker")) {
     
    218218                        }
    219219                    } else if (tagcheckerfile) {
    220                         if (line.length() > 0) {
     220                        if (!line.isEmpty()) {
    221221                            CheckerData d = new CheckerData();
    222222                            String err = d.getData(line);
     
    247247        }
    248248
    249         if (errorSources.length() > 0)
     249        if (!errorSources.isEmpty())
    250250            throw new IOException(tr("Could not access data file(s):\n{0}", errorSources));
    251251    }
     
    382382                withErrors.put(p, "HTML");
    383383            }
    384             if (checkValues && key != null && value != null && value.length() > 0 && presetsValueData != null) {
     384            if (checkValues && key != null && value != null && !value.isEmpty() && presetsValueData != null) {
    385385                final Set<String> values = presetsValueData.get(key);
    386386                final boolean keyInPresets = values != null;
     
    440440                }
    441441            }
    442             if (checkFixmes && key != null && value != null && value.length() > 0) {
     442            if (checkFixmes && key != null && value != null && !value.isEmpty()) {
    443443                if ((value.toLowerCase(Locale.ENGLISH).contains("fixme")
    444444                        || value.contains("check and delete")
Note: See TracChangeset for help on using the changeset viewer.