From 722020ab952bb70548469ef0086eb9c63b69d0d9 Mon Sep 17 00:00:00 2001 From: Inaki Villar Date: Tue, 5 Nov 2024 13:07:06 -0800 Subject: [PATCH] skip the rest of the code if bomCords are found --- .../bootstrap/model/PlatformImportsImpl.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PlatformImportsImpl.java b/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PlatformImportsImpl.java index cbbc84c9ce56fd..b332eb3e72bffc 100644 --- a/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PlatformImportsImpl.java +++ b/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PlatformImportsImpl.java @@ -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())); + } } } }