Changeset 13224 in josm
- Timestamp:
- 2017-12-18T16:16:50+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java
r12663 r13224 25 25 */ 26 26 public static Comparator<OsmPrimitive> comparingNames() { 27 final Comparator<String> digitsLast = comparing(str -> Character.isDigit(str.charAt(0)) ? 1 : 0);27 final Comparator<String> digitsLast = comparing(str -> !str.isEmpty() && Character.isDigit(str.charAt(0)) ? 1 : 0); 28 28 return comparing(memoize(DefaultNameFormatter.getInstance()::format), 29 29 digitsLast.thenComparing(AlphanumComparator.getInstance()));
Note:
See TracChangeset
for help on using the changeset viewer.