mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-03 07:49:03 +00:00
Update JarLauncher to filter BOOT-INF/classes correctly
Previously, JarLauncher considered any entry whose name began with BOOT-INF/classes/ as being a nested entry. This was incorrect as it meant that subdirectories of BOOT-INF/classes/ would be added to the classpath rather than just BOOT-INF/classes/ itself. This commit updates JarLauncher so that only directory entries with a name equal to BOOT-INF/classes are used. Closes gh-5610
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ public class JarLauncher extends ExecutableArchiveLauncher {
|
||||
@Override
|
||||
protected boolean isNestedArchive(Archive.Entry entry) {
|
||||
if (entry.isDirectory()) {
|
||||
return entry.getName().startsWith(BOOT_INF_CLASSES);
|
||||
return entry.getName().equals(BOOT_INF_CLASSES);
|
||||
}
|
||||
return entry.getName().startsWith(BOOT_INF_LIB);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user