提交 837d0c88 编写于 作者: V vlivanov

8006125: Update MethodHandles library interactions

Reviewed-by: jrose
上级 eb70c8a0
......@@ -252,6 +252,12 @@ public final class MethodUtil extends SecureClassLoader {
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"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册