changeset 7415:fef98c3ff64d

8024283: 10 nashorn tests fail with similar stack trace InternalError with cause being NoClassDefFoundError Reviewed-by: twisti
author kizune
date Wed, 09 Apr 2014 13:00:26 +0400
parents b766e67e5027
children b82737ea61d1
files src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Apr 09 13:06:37 2014 +0400
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Wed Apr 09 13:00:26 2014 +0400
@@ -613,6 +613,12 @@
             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))