Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 17808)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 17809)
@@ -46,13 +46,7 @@
 
         if (selected) {
-            if (s.selectedStyle == null) {
-                s.selectedStyle = new DividedScale<>();
-            }
-            s.selectedStyle.put(o, r);
+            s.selectedStyle = (s.selectedStyle == null ? new DividedScale<StyleElementList>() : s.selectedStyle).put(o, r);
         } else {
-            if (s.plainStyle == null) {
-                s.plainStyle = new DividedScale<>();
-            }
-            s.plainStyle.put(o, r);
+            s.plainStyle = (s.plainStyle == null ? new DividedScale<StyleElementList>() : s.plainStyle).put(o, r);
         }
         return s.intern();
@@ -82,10 +76,6 @@
     @Override
     public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
         final StyleCache other = (StyleCache) obj;
         return Objects.equals(plainStyle, other.plainStyle) && Objects.equals(selectedStyle, other.selectedStyle);
