Commit 7d53f7d2 authored by Phillip Webb's avatar Phillip Webb

Attempt to prevent JarFiles from being left open

Update `JarFile` to also call `super.close()` early for nested jars.

See gh-21126
parent 7c6e9124
...@@ -111,6 +111,7 @@ public class JarFile extends java.util.jar.JarFile { ...@@ -111,6 +111,7 @@ public class JarFile extends java.util.jar.JarFile {
*/ */
JarFile(JarFile parent) throws IOException { JarFile(JarFile parent) throws IOException {
super(parent.rootFile.getFile()); super(parent.rootFile.getFile());
super.close();
this.parent = parent; this.parent = parent;
this.rootFile = parent.rootFile; this.rootFile = parent.rootFile;
this.pathFromRoot = parent.pathFromRoot; this.pathFromRoot = parent.pathFromRoot;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment