jdk/src/share/classes/java/beans/EventSetDescriptor.java
changeset 6657 15dbb366c6a3
parent 5947 0e6f2837eeca
child 11120 f8576c769572
equal deleted inserted replaced
6656:9079ac6208b0 6657:15dbb366c6a3
   174 
   174 
   175         setAddListenerMethod(getMethod(sourceClass, addListenerMethodName, 1));
   175         setAddListenerMethod(getMethod(sourceClass, addListenerMethodName, 1));
   176         setRemoveListenerMethod(getMethod(sourceClass, removeListenerMethodName, 1));
   176         setRemoveListenerMethod(getMethod(sourceClass, removeListenerMethodName, 1));
   177 
   177 
   178         // Be more forgiving of not finding the getListener method.
   178         // Be more forgiving of not finding the getListener method.
   179         if (getListenerMethodName != null) {
   179         Method method = Introspector.findMethod(sourceClass, getListenerMethodName, 0);
   180             setGetListenerMethod(Introspector.findInstanceMethod(sourceClass, getListenerMethodName));
   180         if (method != null) {
       
   181             setGetListenerMethod(method);
   181         }
   182         }
   182     }
   183     }
   183 
   184 
   184     private static Method getMethod(Class cls, String name, int args)
   185     private static Method getMethod(Class cls, String name, int args)
   185         throws IntrospectionException {
   186         throws IntrospectionException {