diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java index 72963b90bb664..85466baf9773e 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/tools/ToolsUtils.java @@ -156,13 +156,9 @@ public static ExtensionCatalog resolvePlatformDescriptorDirectly(String bomGroup } final OriginPreference originPreference = new OriginPreference(1, 1, 1, ++memberIndex, 1); - Map metadata = memberCatalog.getMetadata(); - if (metadata.isEmpty()) { - metadata = new HashMap<>(); - ((JsonExtensionCatalog) memberCatalog).setMetadata(metadata); - } + Map metadata = new HashMap<>(memberCatalog.getMetadata()); metadata.put("origin-preference", originPreference); - + ((JsonExtensionCatalog) memberCatalog).setMetadata(metadata); catalogs.add(memberCatalog); } catalog = JsonCatalogMerger.merge(catalogs);