Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 15908)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java	(revision 15909)
@@ -8,4 +8,5 @@
 import org.openstreetmap.josm.gui.mappaint.Environment;
 import org.openstreetmap.josm.gui.mappaint.StyleSource;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -48,5 +49,5 @@
          */
         public Declaration(List<Instruction> instructions, int idx) {
-            this.instructions = instructions;
+            this.instructions = Utils.toUnmodifiableList(instructions);
             this.idx = idx;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 15908)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 15909)
@@ -537,9 +537,5 @@
 
         protected AbstractSelector(List<Condition> conditions) {
-            if (conditions == null || conditions.isEmpty()) {
-                this.conds = null;
-            } else {
-                this.conds = conditions;
-            }
+            this.conds = Utils.toUnmodifiableList(conditions);
         }
 
@@ -552,5 +548,4 @@
         public boolean matches(Environment env) {
             CheckParameterUtil.ensureParameterNotNull(env, "env");
-            if (conds == null) return true;
             for (Condition c : conds) {
                 try {
@@ -569,8 +564,5 @@
          */
         public List<Condition> getConditions() {
-            if (conds == null) {
-                return Collections.emptyList();
-            }
-            return Collections.unmodifiableList(conds);
+            return conds;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java	(revision 15908)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java	(revision 15909)
@@ -89,10 +89,13 @@
         public int classification;
         public int favoriteIndex;
-        private final Collection<String> groups = new HashSet<>();
-        private final Collection<String> names = new HashSet<>();
-        private final Collection<String> tags = new HashSet<>();
+        private final Collection<String> groups;
+        private final Collection<String> names;
+        private final Collection<String> tags;
 
         PresetClassification(TaggingPreset preset) {
             this.preset = preset;
+            Set<String> groups = new HashSet<>();
+            Set<String> names = new HashSet<>();
+            Set<String> tags = new HashSet<>();
             TaggingPreset group = preset.group;
             while (group != null) {
@@ -119,4 +122,7 @@
                 }
             }
+            this.groups = Utils.toUnmodifiableList(groups);
+            this.names = Utils.toUnmodifiableList(names);
+            this.tags = Utils.toUnmodifiableList(tags);
         }
 
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 15908)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 15909)
@@ -748,4 +748,25 @@
 
     /**
+     * Returns an unmodifiable list for the given collection.
+     * Makes use of {@link Collections#emptySet()} and {@link Collections#singleton} and {@link Arrays#asList} to save memory.
+     * @param  collection the collection for which an unmodifiable collection is to be returned
+     * @param <T> the class of the objects in the array
+     * @return an unmodifiable list
+     * @see <a href="https://dzone.com/articles/preventing-your-java-collections-from-wasting-memo">
+     *     How to Prevent Your Java Collections From Wasting Memory</a>
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> List<T> toUnmodifiableList(Collection<T> collection) {
+        // Java 9: use List.of(...)
+        if (collection == null || collection.isEmpty()) {
+            return Collections.emptyList();
+        } else if (collection.size() == 1) {
+            return Collections.singletonList(collection.iterator().next());
+        } else {
+            return (List<T>) Arrays.asList(collection.toArray());
+        }
+    }
+
+    /**
      * Returns the first not empty string in the given candidates, otherwise the default string.
      * @param defaultString default string returned if all candidates would be empty if stripped
Index: /trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 15908)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java	(revision 15909)
@@ -5,4 +5,5 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
@@ -10,6 +11,8 @@
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
@@ -557,3 +560,17 @@
         assertTrue(Utils.hasExtension(new File("JOSM.txt"), "jpg", "txt"));
     }
+
+    /**
+     * Test of {@link Utils#toUnmodifiableList}
+     */
+    @Test
+    public void testToUnmodifiableList() {
+        assertSame(Collections.emptyList(), Utils.toUnmodifiableList(null));
+        assertSame(Collections.emptyList(), Utils.toUnmodifiableList(Collections.emptyList()));
+        assertSame(Collections.emptyList(), Utils.toUnmodifiableList(new ArrayList<>()));
+        assertEquals(Collections.singletonList("foo"), Utils.toUnmodifiableList(new ArrayList<>(Collections.singletonList("foo"))));
+        assertEquals(Arrays.asList("foo", "bar", "baz"), Utils.toUnmodifiableList(Arrays.asList("foo", "bar", "baz")));
+        assertEquals(Arrays.asList("foo", "bar", "baz"), Utils.toUnmodifiableList(new ArrayList<>(Arrays.asList("foo", "bar", "baz"))));
+        assertEquals(Arrays.asList("foo", "bar", "baz"), Utils.toUnmodifiableList(new LinkedList<>(Arrays.asList("foo", "bar", "baz"))));
+    }
 }
