jdk/src/share/classes/sun/dyn/BoundMethodHandle.java
changeset 5722 4ada807383c8
parent 4537 7c3c7f8d5195
child 5725 16c1792b2ee6
--- a/jdk/src/share/classes/sun/dyn/BoundMethodHandle.java	Wed Jul 05 17:11:12 2017 +0200
+++ b/jdk/src/share/classes/sun/dyn/BoundMethodHandle.java	Fri Apr 30 23:48:23 2010 -0700
@@ -146,6 +146,8 @@
         MethodType foundType = null;
         MemberName foundMethod = null;
         for (MemberName method : methods) {
+            if (method.getDeclaringClass() == MethodHandle.class)
+                continue;  // ignore methods inherited from MH class itself
             MethodType mtype = method.getMethodType();
             if (type != null && type.parameterCount() != mtype.parameterCount())
                 continue;