Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException thrown by ExtendedBeanInfo with IBM J9 VM [SPR-10862] #15489

Closed
spring-issuemaster opened this issue Aug 27, 2013 · 0 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 27, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.