Subject: [PATCH] #24075: KeyedItem.MatchType#ofString
---
Index: src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java b/src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java
--- a/src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java	(revision 19280)
+++ b/src/org/openstreetmap/josm/gui/tagging/presets/items/KeyedItem.java	(date 1736186725321)
@@ -78,6 +78,8 @@
         /** Positive if key and value matches, negative otherwise. */
         KEY_VALUE_REQUIRED("keyvalue!");
 
+        private static final MatchType[] VALUES = values();
+
         private final String value;
 
         MatchType(String value) {
@@ -98,7 +100,7 @@
          * @return the {@code MatchType} for the given textual value
          */
         public static MatchType ofString(String type) {
-            for (MatchType i : EnumSet.allOf(MatchType.class)) {
+            for (MatchType i : VALUES) {
                 if (i.getValue().equals(type))
                     return i;
             }
