diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/IntegrationTestUtil.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/IntegrationTestUtil.java index f3aa07dc40270..50b565e3b9f34 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/IntegrationTestUtil.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/IntegrationTestUtil.java @@ -433,9 +433,10 @@ static Properties readQuarkusArtifactProperties(ExtensionContext context) { } throw new IllegalStateException(errorMessage); } - try { - Properties properties = new Properties(); - properties.load(new FileInputStream(artifactProperties.toFile())); + + Properties properties = new Properties(); + try (var fis = new FileInputStream(artifactProperties.toFile())) { + properties.load(fis); return properties; } catch (IOException e) { throw new UncheckedIOException(