Changeset 8873 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-10-14T22:55:08+02:00 (9 years ago)
Author:
Don-vip
Message:

fix #11967 - Regression: Object count in validator broken + add unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/util/MultipleNameVisitor.java

    r8846 r8873  
    6363            displayName = name;
    6464        } else {
    65             displayName = size + ' ' + trn(multipleClassname, multiplePluralClassname, size);
     65            StringBuilder sb = new StringBuilder().append(size).append(' ').append(trn(multipleClassname, multiplePluralClassname, size));
    6666            if (multipleName.length() > 0) {
     67                sb.append(": ");
    6768                if (multipleName.length() <= MULTIPLE_NAME_MAX_LENGTH) {
    68                     displayName += ": " + multipleName;
     69                    sb.append(multipleName);
    6970                } else {
    70                     displayName += ": " + multipleName.substring(0, MULTIPLE_NAME_MAX_LENGTH) + "...";
     71                    sb.append(multipleName.substring(0, MULTIPLE_NAME_MAX_LENGTH)).append("...");
    7172                }
    7273            }
     74            displayName = sb.toString();
    7375        }
    7476    }
Note: See TracChangeset for help on using the changeset viewer.