-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Setanta Mathews opened SPR-10862 and commented
Hi,
In org.springframework.beans.CachedInstrospectionResults there is the code
this.beanInfo = new ExtendedBeanInfo(Introspector.getBeanInfo(beanClass));
With IBM's J9 VM on Linux, the BeanInfo returned by Introspector.getBeanInfo can return null for calls to BeanInfo#getMethodDescriptors. For example, this will happen when beanClass is java.io.Serializable.
When this happens the following code in ExtendedBeanInfo will throw a null pointer exception:
for (MethodDescriptor md : delegate.getMethodDescriptors())
I took a look at the latest ExtendedBeanInfo and it looks like it is still prone to a null pointer exception.
Note that the Javadoc for BeanInfo#getMethodDescriptors does say that the method can return null.
Simple test, run the following with Oracle's VM and then IBM's
System.out.println(java.beans.Introspector.getBeanInfo(java.io.Serializable.class).getMethodDescriptors())
With Oracle you'll get an array object, with IBM you'll get null.
Affects: 3.1.3