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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user