Index: /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 15011)
+++ /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 15012)
@@ -18,4 +18,5 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiPredicate;
 
 import org.openstreetmap.josm.spi.preferences.Config;
@@ -629,13 +630,5 @@
     }
 
-    /**
-     * Replies the value for key <code>key</code>. Replies null, if <code>key</code> is null.
-     * Replies null, if there is no value for the given key.
-     *
-     * @param key the key. Can be null, replies null in this case.
-     * @return the value for key <code>key</code>.
-     */
-    @Override
-    public final String get(String key) {
+    protected final String doGet(String key, BiPredicate<String, String> predicate) {
         if (key == null)
             return null;
@@ -643,7 +636,19 @@
             return null;
         for (int i = 0; i < keys.length; i += 2) {
-            if (keys[i].equals(key)) return keys[i+1];
+            if (predicate.test(keys[i], key)) return keys[i+1];
         }
         return null;
+    }
+
+    /**
+     * Replies the value for key <code>key</code>. Replies null, if <code>key</code> is null.
+     * Replies null, if there is no value for the given key.
+     *
+     * @param key the key. Can be null, replies null in this case.
+     * @return the value for key <code>key</code>.
+     */
+    @Override
+    public final String get(String key) {
+        return doGet(key, String::equals);
     }
 
@@ -654,12 +659,5 @@
      */
     public final String getIgnoreCase(String key) {
-        if (key == null)
-            return null;
-        if (keys == null)
-            return null;
-        for (int i = 0; i < keys.length; i += 2) {
-            if (keys[i].equalsIgnoreCase(key)) return keys[i+1];
-        }
-        return null;
+        return doGet(key, String::equalsIgnoreCase);
     }
 
