Skip to content

Commit 07c0a8b

Browse files
committed
Fix SecurityManager deprecation issues
See gh-32086
1 parent 4ec2e35 commit 07c0a8b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ private JarFile(RandomAccessDataFile rootFile, String pathFromRoot, RandomAccess
128128
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot, RandomAccessData data, JarEntryFilter filter,
129129
JarFileType type, Supplier<Manifest> manifestSupplier) throws IOException {
130130
super(rootFile.getFile());
131-
if (System.getSecurityManager() == null) {
132-
super.close();
133-
}
131+
super.close();
134132
this.rootFile = rootFile;
135133
this.pathFromRoot = pathFromRoot;
136134
CentralDirectoryParser parser = new CentralDirectoryParser();

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class JarFileWrapper extends AbstractJarFile {
4040
JarFileWrapper(JarFile parent) throws IOException {
4141
super(parent.getRootJarFile().getFile());
4242
this.parent = parent;
43-
if (System.getSecurityManager() == null) {
44-
super.close();
45-
}
43+
super.close();
4644
}
4745

4846
@Override

0 commit comments

Comments
 (0)