Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 12093)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 12095)
@@ -1535,10 +1535,5 @@
         settingsMap.keySet().stream()
                 .filter(key -> key.startsWith(COLOR_PREFIX))
-                .flatMap(key -> {
-                    final String newKey = ColorProperty.getColorKey(key.substring(COLOR_PREFIX.length()));
-                    return key.equals(newKey) || settingsMap.containsKey(newKey)
-                            ? Stream.empty()
-                            : Stream.of(new AbstractMap.SimpleImmutableEntry<>(key, newKey));
-                })
+                .flatMap(this::searchOldColorKey)
                 .collect(Collectors.toList()) // to avoid ConcurrentModificationException
                 .forEach(entry -> {
@@ -1549,4 +1544,11 @@
                     put(oldKey, null);
                 });
+    }
+
+    private Stream<AbstractMap.SimpleImmutableEntry<String, String>> searchOldColorKey(String key) {
+        final String newKey = ColorProperty.getColorKey(key.substring(COLOR_PREFIX.length()));
+        return key.equals(newKey) || settingsMap.containsKey(newKey)
+                ? Stream.empty()
+                : Stream.of(new AbstractMap.SimpleImmutableEntry<>(key, newKey));
     }
 
