提交 75bdf1d4 编写于 作者: R rfield

8024283: 10 nashorn tests fail with similar stack trace InternalError with...

8024283: 10 nashorn tests fail with similar stack trace InternalError with cause being NoClassDefFoundError
Summary: Fix pre-existing 292 bug tickled by combo of nashorn code and MethodHandleInfo changes
Reviewed-by: jrose
Contributed-by: vladimir.x.ivanov@oracle.com
上级 4749e5d0
......@@ -612,6 +612,12 @@ class InvokerBytecodeGenerator {
return false; // inner class of some sort
if (cls.getClassLoader() != MethodHandle.class.getClassLoader())
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))
return true; // in java.lang.invoke package
if (member.isPublic() && isStaticallyNameable(cls))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册