Changeset 12095 in josm for trunk/src/org
- Timestamp:
- 2017-05-10T22:24:16+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r11913 r12095 1535 1535 settingsMap.keySet().stream() 1536 1536 .filter(key -> key.startsWith(COLOR_PREFIX)) 1537 .flatMap(key -> { 1538 final String newKey = ColorProperty.getColorKey(key.substring(COLOR_PREFIX.length())); 1539 return key.equals(newKey) || settingsMap.containsKey(newKey) 1540 ? Stream.empty() 1541 : Stream.of(new AbstractMap.SimpleImmutableEntry<>(key, newKey)); 1542 }) 1537 .flatMap(this::searchOldColorKey) 1543 1538 .collect(Collectors.toList()) // to avoid ConcurrentModificationException 1544 1539 .forEach(entry -> { … … 1549 1544 put(oldKey, null); 1550 1545 }); 1546 } 1547 1548 private Stream<AbstractMap.SimpleImmutableEntry<String, String>> searchOldColorKey(String key) { 1549 final String newKey = ColorProperty.getColorKey(key.substring(COLOR_PREFIX.length())); 1550 return key.equals(newKey) || settingsMap.containsKey(newKey) 1551 ? Stream.empty() 1552 : Stream.of(new AbstractMap.SimpleImmutableEntry<>(key, newKey)); 1551 1553 } 1552 1554
Note:
See TracChangeset
for help on using the changeset viewer.