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:
Andy Wilkinson
2016-04-05 16:30:50 +01:00
parent 87de7e6382
commit 6121d105fc

View File

@@ -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);
}