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
pull/5535/merge
Andy Wilkinson 9 years ago
parent 87de7e6382
commit 6121d105fc

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

Loading…
Cancel
Save