8214795: Add safety check to dynalink inner class lookup
Reviewed-by: sundar, attila
This commit is contained in:
parent
055ed2b789
commit
74fa722567
@ -216,7 +216,10 @@ class AccessibleMembersLookup {
|
|||||||
// were not yet loaded, they'll only get loaded in a non-resolved state; no static initializers for
|
// were not yet loaded, they'll only get loaded in a non-resolved state; no static initializers for
|
||||||
// them will trigger just by doing this.
|
// them will trigger just by doing this.
|
||||||
// Don't overwrite an inner class with an inherited inner class with the same name.
|
// Don't overwrite an inner class with an inherited inner class with the same name.
|
||||||
innerClasses.putIfAbsent(innerClass.getSimpleName(), innerClass);
|
Class<?> previousClass = innerClasses.get(innerClass.getSimpleName());
|
||||||
|
if (previousClass == null || previousClass.getDeclaringClass().isAssignableFrom(innerClass.getDeclaringClass())) {
|
||||||
|
innerClasses.put(innerClass.getSimpleName(), innerClass);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
searchSuperTypes = true;
|
searchSuperTypes = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user