diff --git a/src/org/openstreetmap/josm/data/Preferences.java b/src/org/openstreetmap/josm/data/Preferences.java
index ec382d8..b700a7f 100644
|
a
|
b
|
|
| 17 | 17 | import java.lang.annotation.RetentionPolicy; |
| 18 | 18 | import java.lang.reflect.Field; |
| 19 | 19 | import java.nio.charset.StandardCharsets; |
| | 20 | import java.util.AbstractMap; |
| 20 | 21 | import java.util.ArrayList; |
| 21 | 22 | import java.util.Collection; |
| 22 | 23 | import java.util.Collections; |
| … |
… |
|
| 37 | 38 | import java.util.function.Predicate; |
| 38 | 39 | import java.util.regex.Matcher; |
| 39 | 40 | import java.util.regex.Pattern; |
| | 41 | import java.util.stream.Collectors; |
| 40 | 42 | import java.util.stream.Stream; |
| 41 | 43 | |
| 42 | 44 | import javax.json.Json; |
| … |
… |
private void removeObsolete(int loadedVersion) {
|
| 1525 | 1527 | removeUrlFromEntries(loadedVersion, 10063, |
| 1526 | 1528 | "validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", |
| 1527 | 1529 | "resource://data/validator/power.mapcss"); |
| 1528 | | |
| | 1530 | // drop in February 2017 |
| | 1531 | settingsMap.keySet().stream() |
| | 1532 | .filter(key -> key.startsWith("color.")) |
| | 1533 | .flatMap(key -> { |
| | 1534 | final String newKey = ColorProperty.getColorKey(key.substring("color.".length())); |
| | 1535 | return key.equals(newKey) ? Stream.empty() : Stream.of(new AbstractMap.SimpleImmutableEntry<>(key, newKey)); |
| | 1536 | }) |
| | 1537 | .collect(Collectors.toList()) // to avoid ConcurrentModificationException |
| | 1538 | .forEach(entry -> { |
| | 1539 | final String oldKey = entry.getKey(); |
| | 1540 | final String newKey = entry.getValue(); |
| | 1541 | Main.info("Migrating {0} => {1}", oldKey, newKey); |
| | 1542 | put(newKey, get(oldKey)); |
| | 1543 | put(oldKey, null); |
| | 1544 | }); |
| 1529 | 1545 | for (String key : OBSOLETE_PREF_KEYS) { |
| 1530 | 1546 | if (settingsMap.containsKey(key)) { |
| 1531 | 1547 | settingsMap.remove(key); |