8024283: 10 nashorn tests fail with similar stack trace InternalError with cause being NoClassDefFoundError
Fix pre-existing 292 bug tickled by combo of nashorn code and MethodHandleInfo changes Reviewed-by: jrose
This commit is contained in:
parent
b1127783de
commit
a277d40ead
@ -612,6 +612,12 @@ class InvokerBytecodeGenerator {
|
|||||||
return false; // inner class of some sort
|
return false; // inner class of some sort
|
||||||
if (cls.getClassLoader() != MethodHandle.class.getClassLoader())
|
if (cls.getClassLoader() != MethodHandle.class.getClassLoader())
|
||||||
return false; // not on BCP
|
return false; // not on BCP
|
||||||
|
MethodType mtype = member.getMethodOrFieldType();
|
||||||
|
if (!isStaticallyNameable(mtype.returnType()))
|
||||||
|
return false;
|
||||||
|
for (Class<?> ptype : mtype.parameterArray())
|
||||||
|
if (!isStaticallyNameable(ptype))
|
||||||
|
return false;
|
||||||
if (!member.isPrivate() && VerifyAccess.isSamePackage(MethodHandle.class, cls))
|
if (!member.isPrivate() && VerifyAccess.isSamePackage(MethodHandle.class, cls))
|
||||||
return true; // in java.lang.invoke package
|
return true; // in java.lang.invoke package
|
||||||
if (member.isPublic() && isStaticallyNameable(cls))
|
if (member.isPublic() && isStaticallyNameable(cls))
|
||||||
|
Loading…
Reference in New Issue
Block a user