Polish multi-release jar support to avoid possible StackOverflowError

See gh-12523
pull/15223/head
Andy Wilkinson 6 years ago
parent 56eebc9385
commit 3fac0f0360

@ -246,7 +246,7 @@ class JarFileEntries implements CentralDirectoryVisitor, Iterable<JarEntry> {
private <T extends FileHeader> T getEntry(CharSequence name, Class<T> type, private <T extends FileHeader> T getEntry(CharSequence name, Class<T> type,
boolean cacheEntry) { boolean cacheEntry) {
T entry = doGetEntry(name, type, cacheEntry, null); T entry = doGetEntry(name, type, cacheEntry, null);
if (isMultiReleaseJar() && !isMetaInfEntry(name)) { if (!isMetaInfEntry(name) && isMultiReleaseJar()) {
int version = RUNTIME_VERSION; int version = RUNTIME_VERSION;
AsciiBytes nameAlias = (entry instanceof JarEntry) AsciiBytes nameAlias = (entry instanceof JarEntry)
? ((JarEntry) entry).getAsciiBytesName() ? ((JarEntry) entry).getAsciiBytesName()

Loading…
Cancel
Save