Skip to content

Commit

Permalink
Merge pull request #32436 from vespa-engine/hmusum/close-resource
Browse files Browse the repository at this point in the history
Make sure to close stream
  • Loading branch information
freva authored Sep 19, 2024
2 parents 5acb0a3 + d427f36 commit 0d41835
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ private void validateServicesFile() throws IOException {
}

private long filesInApplicationPackage() {
return uncheck(() -> Files.list(appDir.toPath()).count());
return uncheck(() -> { try (var files = Files.list(appDir.toPath())) { return files.count(); } });
}

private void copyUserDefsIntoApplication() {
Expand Down

0 comments on commit 0d41835

Please sign in to comment.