Skip to content

Commit

Permalink
Properly close metadata file in integration tests
Browse files Browse the repository at this point in the history
Fixes: quarkusio#31713
(cherry picked from commit 4d22c5f)
  • Loading branch information
geoand authored and gsmet committed Mar 20, 2023
1 parent c839d09 commit f982ba3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f982ba3

Please sign in to comment.