The JavaBeans specification states under certain circumstances it is permissible to allow method signatures containing one or more parameters of any arbitrary Java type. But the changes made to EventDescriptor.java in JDK1.5 does not provide support for this.
For example if EventDescriptor is constructed with listener methods array, but the caller doesn't maintain any hard reference to the array. Because EventDescriptor uses soft reference to the listener method array, it may be gced based on memory constraints. In such cases, EventSetDescriptor uses introspector to find listener methods but methods are looked up using the method names array and only methods which takes only one argument is looked for. This will break lots of components whose listener methods have 0 or more than 1 arguments.
If you look into the code in EventSetDescriptor.java
public synchronized Method[] getListenerMethods() {
Method[] methods = getListenerMethods0();
if (methods == null) {
if (listenerMethodDescriptors != null) {
methods = new Method[listenerMethodDescriptors.length];
for (int i = 0; i < methods.length; i++) {
methods[i] = listenerMethodDescriptors[i].getMethod();
}
} else if (listenerMethodNames != null) {
methods = new Method[listenerMethodNames.length];
for (int i = 0; i < methods.length; i++) {
methods[i] = Introspector.findMethod(getListenerType(),
listenerMethodNames[i], 1);
}
}
setListenerMethods(methods);
}
return methods;
}
Note that argument count passed to findMethod is always one.