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 9266dc758bf2c..92867577a8d39 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 @@ -155,8 +155,9 @@ public static ExtensionCatalog resolvePlatformDescriptorDirectly(String bomGroup final OriginPreference originPreference = new OriginPreference(1, 1, 1, ++memberIndex, 1); Map metadata = new HashMap<>(memberCatalog.getMetadata()); metadata.put("origin-preference", originPreference); - ((ExtensionCatalog.Mutable) memberCatalog).setMetadata(metadata); - catalogs.add(memberCatalog); + ExtensionCatalog.Mutable mutableMemberCatalog = memberCatalog.mutable(); + mutableMemberCatalog.setMetadata(metadata); + catalogs.add(mutableMemberCatalog.build()); } catalog = CatalogMergeUtility.merge(catalogs); }