Polish multi-release jar support to avoid possible StackOverflowError

See gh-12523
This commit is contained in:
Andy Wilkinson 2018-11-20 17:26:28 +00:00
parent 56eebc9385
commit 3fac0f0360
1 changed files with 1 additions and 1 deletions

View File

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