-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
b45
-
x86
-
linux_sun, windows_2000
jdk 1.5.0 b39
After some time, form editor in NetBeans is not able to generate code for event handlers, failing on NullPointerException because EventSetDescriptor.getAddListenerMethod() returns null.
The cause seems to be in that the non-public "merge" and "clone" constructors of EventSetDescriptor (unlike the public constructors) don't copy the names of the "add" and "remove" listener methods. These methods (java.lang.reflect.Method) are held weekly so when the week reference is released, getAddListenerMethod() and getRemoveListenerMethod() return null as they are not able to recover the methods from the names.
In NetBeans, introspecting e.g. JFrame leeds to the Introspecor calling the "merge" constructors of EventSetDescriptor - I think it is because there are multiple BeanInfo search paths in NB (e.g. dt.jar is on it).
###@###.### 2004-02-24
After some time, form editor in NetBeans is not able to generate code for event handlers, failing on NullPointerException because EventSetDescriptor.getAddListenerMethod() returns null.
The cause seems to be in that the non-public "merge" and "clone" constructors of EventSetDescriptor (unlike the public constructors) don't copy the names of the "add" and "remove" listener methods. These methods (java.lang.reflect.Method) are held weekly so when the week reference is released, getAddListenerMethod() and getRemoveListenerMethod() return null as they are not able to recover the methods from the names.
In NetBeans, introspecting e.g. JFrame leeds to the Introspecor calling the "merge" constructors of EventSetDescriptor - I think it is because there are multiple BeanInfo search paths in NB (e.g. dt.jar is on it).
###@###.### 2004-02-24
- duplicates
-
JDK-4982951 NullPointerException occurs during Introspection
- Closed