Attempt to prevent JarFiles from being left open

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

See gh-21126
This commit is contained in:
Phillip Webb
2020-04-25 22:19:42 -07:00
parent 7c6e912463
commit 7d53f7d27f

View File

@@ -111,6 +111,7 @@ public class JarFile extends java.util.jar.JarFile {
*/
JarFile(JarFile parent) throws IOException {
super(parent.rootFile.getFile());
super.close();
this.parent = parent;
this.rootFile = parent.rootFile;
this.pathFromRoot = parent.pathFromRoot;