8243287: Removal of Unsafe::defineAnonymousClass

Reviewed-by: iklam, mchung, alanb, dholmes
This commit is contained in:
Harold Seigel 2021-05-13 12:46:54 +00:00
parent a564f2cbd5
commit e14b026841
122 changed files with 328 additions and 3679 deletions

View file

@ -1012,8 +1012,6 @@ class InvokerBytecodeGenerator {
return false; // not on BCP
if (cls.isHidden())
return false;
if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: Unsafe::defineAnonymousClass to be removed
return false;
if (!isStaticallyInvocableType(member.getMethodOrFieldType()))
return false;
if (!member.isPrivate() && VerifyAccess.isSamePackage(MethodHandle.class, cls))
@ -1045,8 +1043,6 @@ class InvokerBytecodeGenerator {
return true; // int[].class, for example
if (cls.isHidden())
return false;
if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: Unsafe::defineAnonymousClass to be removed
return false;
// could use VerifyAccess.isClassAccessible but the following is a safe approximation
if (cls.getClassLoader() != Object.class.getClassLoader())
return false;