Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 17799)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 17800)
@@ -8,4 +8,5 @@
 import java.text.MessageFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -215,5 +216,5 @@
                     return;
                 int count = counter.getAsInt();
-                if (link.conds == null || link.conds.isEmpty()) {
+                if (link.getConditions().isEmpty()) {
                     // index is not needed, we can avoid the sequential search below
                     e.parent = parent;
@@ -235,5 +236,5 @@
 
             private boolean firstAndLastOnly() {
-                return link.conds.stream().allMatch(c -> c instanceof IndexCondition && ((IndexCondition) c).isFirstOrLast);
+                return link.getConditions().stream().allMatch(c -> c instanceof IndexCondition && ((IndexCondition) c).isFirstOrLast);
             }
 
@@ -574,6 +575,6 @@
                 }
             } else if (ChildOrParentSelectorType.CHILD == type
-                    && link.conds != null && !link.conds.isEmpty()
-                    && link.conds.get(0) instanceof OpenEndPseudoClassCondition) {
+                    && !link.getConditions().isEmpty()
+                    && link.getConditions().get(0) instanceof OpenEndPseudoClassCondition) {
                 if (e.osm instanceof INode) {
                     e.osm.visitReferrers(new MultipolygonOpenEndFinder(e));
@@ -638,8 +639,8 @@
     abstract class AbstractSelector implements Selector {
 
-        protected final List<Condition> conds;
+        private final Condition[] conds;
 
         protected AbstractSelector(List<Condition> conditions) {
-            this.conds = Utils.toUnmodifiableList(conditions);
+            this.conds = conditions.toArray(new Condition[0]);
         }
 
@@ -666,5 +667,5 @@
         @Override
         public List<Condition> getConditions() {
-            return conds;
+            return Arrays.asList(conds);
         }
     }
@@ -703,5 +704,5 @@
         @Override
         public String toString() {
-            return "LinkSelector{conditions=" + conds + '}';
+            return "LinkSelector{conditions=" + getConditions() + '}';
         }
     }
@@ -832,5 +833,5 @@
             return base
                     + (Range.ZERO_TO_INFINITY.equals(range) ? "" : range)
-                    + (conds != null ? conds.stream().map(String::valueOf).collect(Collectors.joining("")) : "")
+                    + (getConditions().stream().map(String::valueOf).collect(Collectors.joining("")))
                     + (subpart != null && subpart != Subpart.DEFAULT_SUBPART ? ("::" + subpart) : "");
         }
Index: trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 17799)
+++ trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java	(revision 17800)
@@ -79,5 +79,5 @@
     @Test
     void testClassCondition() throws Exception {
-        List<Condition> conditions = ((Selector.GeneralSelector) getParser("way[name=X].highway:closed").selector()).conds;
+        List<Condition> conditions = getParser("way[name=X].highway:closed").selector().getConditions();
         assertTrue(conditions.get(0) instanceof SimpleKeyValueCondition);
         assertTrue(conditions.get(0).applies(getEnvironment("name", "X")));
@@ -89,8 +89,8 @@
     @Test
     void testPseudoClassCondition() throws Exception {
-        Condition c0 = ((Selector.GeneralSelector) getParser("way:area-style").selector()).conds.get(0);
-        Condition c1 = ((Selector.GeneralSelector) getParser("way!:area-style").selector()).conds.get(0);
-        Condition c2 = ((Selector.GeneralSelector) getParser("way!:areaStyle").selector()).conds.get(0);
-        Condition c3 = ((Selector.GeneralSelector) getParser("way!:area_style").selector()).conds.get(0);
+        Condition c0 = getParser("way:area-style").selector().getConditions().get(0);
+        Condition c1 = getParser("way!:area-style").selector().getConditions().get(0);
+        Condition c2 = getParser("way!:areaStyle").selector().getConditions().get(0);
+        Condition c3 = getParser("way!:area_style").selector().getConditions().get(0);
         assertEquals(":areaStyle", c0.toString());
         assertEquals("!:areaStyle", c1.toString());
