Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 19101)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 19102)
@@ -636,4 +636,7 @@
     @SuppressWarnings("unchecked")
     public static <T> List<T> toUnmodifiableList(Collection<T> collection) {
+        // Note: Windows does a `null` check on startup on these lists. See #23717.
+        // Only change this once that is fixed.
+        // Java 9: use List.of(...)
         if (isEmpty(collection)) {
             return Collections.emptyList();
@@ -641,7 +644,5 @@
             return Collections.singletonList(collection.iterator().next());
         } else {
-            // List.copyOf would also work, but if the original collection is immutable, it just returns the original
-            // collection.
-            return (List<T>) List.of(collection.toArray());
+            return (List<T>) Arrays.asList(collection.toArray());
         }
     }
