Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 14448)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPreset.java	(revision 14449)
@@ -21,4 +21,5 @@
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.CompletableFuture;
 import java.util.function.Predicate;
 
@@ -128,4 +129,7 @@
     private boolean originalSelectionEmpty;
 
+    /** The completable future task of asynchronous icon loading */
+    private CompletableFuture<Void> iconFuture;
+
     /**
      * Create an empty tagging preset. This will not have any items and
@@ -215,16 +219,16 @@
         File arch = TaggingPresetReader.getZipIcons();
         final Collection<String> s = Config.getPref().getList("taggingpreset.icon.sources", null);
-        ImageProvider imgProv = new ImageProvider(iconName);
-        imgProv.setDirs(s);
-        imgProv.setId("presets");
-        imgProv.setArchive(arch);
-        imgProv.setOptional(true);
-        imgProv.getResourceAsync(result -> {
-            if (result != null) {
-                GuiHelper.runInEDT(() -> result.attachImageIcon(this));
-            } else {
-                Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
-            }
-        });
+        this.iconFuture = new ImageProvider(iconName)
+            .setDirs(s)
+            .setId("presets")
+            .setArchive(arch)
+            .setOptional(true)
+            .getResourceAsync(result -> {
+                if (result != null) {
+                    GuiHelper.runInEDT(() -> result.attachImageIcon(this));
+                } else {
+                    Logging.warn(toString() + ": " + PRESET_ICON_ERROR_MSG_PREFIX + iconName);
+                }
+            });
     }
 
@@ -648,3 +652,12 @@
         return actionParser.saveAction(new ToolbarPreferences.ActionDefinition(this));
     }
+
+    /**
+     * Returns the completable future task that performs icon loading, if any.
+     * @return the completable future task that performs icon loading, or null
+     * @since 14449
+     */
+    public CompletableFuture<Void> getIconLoadingTask() {
+        return iconFuture;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 14448)
+++ trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 14449)
@@ -146,11 +146,12 @@
                     f.set(c, getValueForClass(f.getType(), value));
                 } else {
+                    String setter;
                     if (fieldName.startsWith(lang)) {
                         int l = lang.length();
-                        fieldName = "set" + fieldName.substring(l, l + 1).toUpperCase(Locale.ENGLISH) + fieldName.substring(l + 1);
+                        setter = "set" + fieldName.substring(l, l + 1).toUpperCase(Locale.ENGLISH) + fieldName.substring(l + 1);
                     } else {
-                        fieldName = "set" + fieldName.substring(0, 1).toUpperCase(Locale.ENGLISH) + fieldName.substring(1);
+                        setter = "set" + fieldName.substring(0, 1).toUpperCase(Locale.ENGLISH) + fieldName.substring(1);
                     }
-                    Method m = entry.getMethod(fieldName);
+                    Method m = entry.getMethod(setter);
                     if (m != null) {
                         m.invoke(c, getValueForClass(m.getParameterTypes()[0], value));
