changeset 5987:c7282a85c6bc jdk7u11-b32

Merge
author ewendeli
date Tue, 15 Jan 2013 08:23:44 +0100
parents 0c222d0e08a5 0e35f0184115
children 9a709a8e6108
files .hgtags
diffstat 3 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Dec 07 08:19:26 2012 -0800
+++ b/.hgtags	Tue Jan 15 08:23:44 2013 +0100
@@ -226,3 +226,5 @@
 115d1e4365293846bbc911cf312886c471e37fbd jdk7u10-b18
 84218dff5e4c7bc00fd9266769c0d12bdde866f5 jdk7u10-b30
 3515fd583ede49b125a0b5f72ac403b3984d199b jdk7u10-b31
+ecc14534318c80dc7612c8b1d328a67849c5b07f jdk7u11-b20
+d9969a953f693f5760b1d2759f11a2cb222e4f20 jdk7u11-b21
--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Fri Dec 07 08:19:26 2012 -0800
+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Tue Jan 15 08:23:44 2013 +0100
@@ -418,6 +418,21 @@
             return defc == sun.misc.Unsafe.class;
         case "lookup":
             return defc == java.lang.invoke.MethodHandles.class;
+        case "findStatic":
+        case "findVirtual":
+        case "findConstructor":
+        case "findSpecial":
+        case "findGetter":
+        case "findSetter":
+        case "findStaticGetter":
+        case "findStaticSetter":
+        case "bind":
+        case "unreflect":
+        case "unreflectSpecial":
+        case "unreflectConstructor":
+        case "unreflectGetter":
+        case "unreflectSetter":
+            return defc == java.lang.invoke.MethodHandles.Lookup.class;
         case "invoke":
             return defc == java.lang.reflect.Method.class;
         case "get":
--- a/src/share/classes/sun/reflect/misc/MethodUtil.java	Fri Dec 07 08:19:26 2012 -0800
+++ b/src/share/classes/sun/reflect/misc/MethodUtil.java	Tue Jan 15 08:23:44 2013 +0100
@@ -256,6 +256,12 @@
     public static Object invoke(Method m, Object obj, Object[] params)
         throws InvocationTargetException, IllegalAccessException {
         if (m.getDeclaringClass().equals(AccessController.class) ||
+           (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.class)
+            && m.getName().equals("lookup")) ||
+           (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.Lookup.class)
+            && (m.getName().startsWith("find") ||
+                m.getName().startsWith("bind") ||
+                m.getName().startsWith("unreflect"))) ||
             m.getDeclaringClass().equals(Method.class))
             throw new InvocationTargetException(
                 new UnsupportedOperationException("invocation not supported"));