Skip to content

Commit

Permalink
skip the rest of the code if bomCords are found
Browse files Browse the repository at this point in the history
  • Loading branch information
cdsap committed Nov 5, 2024
1 parent f9b290a commit 722020a
Showing 1 changed file with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,21 @@ public void addPlatformProperties(String groupId, String artifactId, String clas
importedPlatformBoms.computeIfAbsent(groupId, g -> new ArrayList<>());
if (!importedPlatformBoms.get(groupId).contains(bomCoords)) {
importedPlatformBoms.get(groupId).add(bomCoords);
}
final Properties props = new Properties();
try (InputStream is = Files.newInputStream(propsPath)) {
props.load(is);
} catch (IOException e) {
throw new AppModelResolverException("Failed to read properties from " + propsPath, e);
}
for (Map.Entry<?, ?> prop : props.entrySet()) {
final String name = String.valueOf(prop.getKey());
if (name.startsWith(BootstrapConstants.PLATFORM_PROPERTY_PREFIX)) {
if (isPlatformReleaseInfo(name)) {
addPlatformRelease(name, String.valueOf(prop.getValue()));
} else {
collectedProps.putIfAbsent(name, String.valueOf(prop.getValue().toString()));

final Properties props = new Properties();
try (InputStream is = Files.newInputStream(propsPath)) {
props.load(is);
} catch (IOException e) {
throw new AppModelResolverException("Failed to read properties from " + propsPath, e);
}
for (Map.Entry<?, ?> prop : props.entrySet()) {
final String name = String.valueOf(prop.getKey());
if (name.startsWith(BootstrapConstants.PLATFORM_PROPERTY_PREFIX)) {
if (isPlatformReleaseInfo(name)) {
addPlatformRelease(name, String.valueOf(prop.getValue()));
} else {
collectedProps.putIfAbsent(name, String.valueOf(prop.getValue().toString()));
}
}
}
}
Expand Down

0 comments on commit 722020a

Please sign in to comment.