jdk/src/share/classes/sun/dyn/BoundMethodHandle.java
changeset 5722 4ada807383c8
parent 4537 7c3c7f8d5195
child 5725 16c1792b2ee6
equal deleted inserted replaced
5371:ff9031a745d9 5722:4ada807383c8
   144         if (matchArity)  type.getClass();  // elicit NPE
   144         if (matchArity)  type.getClass();  // elicit NPE
   145         List<MemberName> methods = IMPL_NAMES.getMethods(caller, true, name, null, caller);
   145         List<MemberName> methods = IMPL_NAMES.getMethods(caller, true, name, null, caller);
   146         MethodType foundType = null;
   146         MethodType foundType = null;
   147         MemberName foundMethod = null;
   147         MemberName foundMethod = null;
   148         for (MemberName method : methods) {
   148         for (MemberName method : methods) {
       
   149             if (method.getDeclaringClass() == MethodHandle.class)
       
   150                 continue;  // ignore methods inherited from MH class itself
   149             MethodType mtype = method.getMethodType();
   151             MethodType mtype = method.getMethodType();
   150             if (type != null && type.parameterCount() != mtype.parameterCount())
   152             if (type != null && type.parameterCount() != mtype.parameterCount())
   151                 continue;
   153                 continue;
   152             else if (foundType == null)
   154             else if (foundType == null)
   153                 foundType = mtype;
   155                 foundType = mtype;