changeset 5628:2ad88a6b3693

Merge
author coffeys
date Mon, 14 Jan 2013 08:54:02 -0800
parents f1909d3ab2a1 0e35f0184115
children 60dda124c866
files .hgtags src/share/classes/java/lang/invoke/MethodHandleNatives.java src/share/classes/java/lang/invoke/MethodHandles.java
diffstat 3 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Jan 14 14:35:47 2013 +0400
+++ b/.hgtags	Mon Jan 14 08:54:02 2013 -0800
@@ -223,6 +223,8 @@
 a1c5bac982a6d4aa58f551cb46cde53f526aca48 jdk7u10-b17
 115d1e4365293846bbc911cf312886c471e37fbd jdk7u10-b18
 84218dff5e4c7bc00fd9266769c0d12bdde866f5 jdk7u10-b30
+ecc14534318c80dc7612c8b1d328a67849c5b07f jdk7u11-b20
+d9969a953f693f5760b1d2759f11a2cb222e4f20 jdk7u11-b21
 df945ef30444adf08f3ef14b0c49c8bda6dda587 jdk7u8-b01
 dd1e513c05b8b8c8402e9ecf9c0d5bdbebb1a089 jdk7u8-b02
 355cf1937d0824b54ac38ee5a5496197647840f9 jdk7u8-b03
--- a/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Mon Jan 14 14:35:47 2013 +0400
+++ b/src/share/classes/java/lang/invoke/MethodHandleNatives.java	Mon Jan 14 08:54:02 2013 -0800
@@ -402,6 +402,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	Mon Jan 14 14:35:47 2013 +0400
+++ b/src/share/classes/sun/reflect/misc/MethodUtil.java	Mon Jan 14 08:54:02 2013 -0800
@@ -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"));