Skip to content

Commit 7d53f7d

Browse files
committed
Attempt to prevent JarFiles from being left open
Update `JarFile` to also call `super.close()` early for nested jars. See gh-21126
1 parent 7c6e912 commit 7d53f7d

File tree

1 file changed

+1
-0
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar

1 file changed

+1
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public JarFile(File file) throws IOException {
111111
*/
112112
JarFile(JarFile parent) throws IOException {
113113
super(parent.rootFile.getFile());
114+
super.close();
114115
this.parent = parent;
115116
this.rootFile = parent.rootFile;
116117
this.pathFromRoot = parent.pathFromRoot;

0 commit comments

Comments
 (0)