Skip to content

Commit bbb56f9

Browse files
authored
Merge pull request #31718 from geoand/#31713
Properly close metadata file in integration tests
2 parents 9a520b9 + 4d22c5f commit bbb56f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test-framework/junit5/src/main/java/io/quarkus/test/junit/IntegrationTestUtil.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,10 @@ static Properties readQuarkusArtifactProperties(ExtensionContext context) {
433433
}
434434
throw new IllegalStateException(errorMessage);
435435
}
436-
try {
437-
Properties properties = new Properties();
438-
properties.load(new FileInputStream(artifactProperties.toFile()));
436+
437+
Properties properties = new Properties();
438+
try (var fis = new FileInputStream(artifactProperties.toFile())) {
439+
properties.load(fis);
439440
return properties;
440441
} catch (IOException e) {
441442
throw new UncheckedIOException(

0 commit comments

Comments
 (0)