Skip to content

Commit

Permalink
Merge pull request #18816 from gastaldi/refac
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi authored Jul 19, 2021
2 parents be320a1 + b0feb74 commit 71790a5
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,9 @@ public static ExtensionCatalog resolvePlatformDescriptorDirectly(String bomGroup
}

final OriginPreference originPreference = new OriginPreference(1, 1, 1, ++memberIndex, 1);
Map<String, Object> metadata = memberCatalog.getMetadata();
if (metadata.isEmpty()) {
metadata = new HashMap<>();
((JsonExtensionCatalog) memberCatalog).setMetadata(metadata);
}
Map<String, Object> metadata = new HashMap<>(memberCatalog.getMetadata());
metadata.put("origin-preference", originPreference);

((JsonExtensionCatalog) memberCatalog).setMetadata(metadata);
catalogs.add(memberCatalog);
}
catalog = JsonCatalogMerger.merge(catalogs);
Expand Down

0 comments on commit 71790a5

Please sign in to comment.