Skip to content

Commit

Permalink
Attempt to prevent JarFiles from being left open
Browse files Browse the repository at this point in the history
Update `JarFile` to also call `super.close()` early for nested jars.

See gh-21126
  • Loading branch information
philwebb committed Apr 26, 2020
1 parent 7c6e912 commit 7d53f7d
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -111,6 +111,7 @@ public JarFile(File file) throws IOException {
*/
JarFile(JarFile parent) throws IOException {
super(parent.rootFile.getFile());
super.close();
this.parent = parent;
this.rootFile = parent.rootFile;
this.pathFromRoot = parent.pathFromRoot;
Expand Down

0 comments on commit 7d53f7d

Please sign in to comment.