changeset 6758:9995881dfb4e

8006125: Update MethodHandles library interactions Reviewed-by: jrose
author vlivanov
date Fri, 22 Feb 2013 02:59:24 -0800
parents 62be74f35886
children 0807820fca96
files src/share/classes/sun/reflect/misc/MethodUtil.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/reflect/misc/MethodUtil.java	Fri Feb 22 03:00:12 2013 -0800
+++ b/src/share/classes/sun/reflect/misc/MethodUtil.java	Fri Feb 22 02:59:24 2013 -0800
@@ -252,6 +252,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"));