[weld-issues] [JBoss JIRA] Closed: (WELDX-89) ReflectionUtils does not check for null superclass of interfaces

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Tue Mar 30 23:24:37 EDT 2010


     [ https://jira.jboss.org/jira/browse/WELDX-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas closed WELDX-89.
-------------------------------

    Resolution: Done


> ReflectionUtils does not check for null superclass of interfaces
> ----------------------------------------------------------------
>
>                 Key: WELDX-89
>                 URL: https://jira.jboss.org/jira/browse/WELDX-89
>             Project: Weld Extensions
>          Issue Type: Bug
>          Components: Weld Extensions
>            Reporter: Dan Allen
>            Assignee: Stuart Douglas
>             Fix For: Weld Extensions 1.0.0.Beta1
>
>
> All the methods in ReflectionUtils assume that Object is the superclass of every type and uses this condition to abort the walk of the type hierarchy. However, when an interface is passed in, the superclass is null, which causes these methods to throw a NullPointerException in the case the field or method is not found.
> Proper logic is:
> while (p != null && p != Object.class) {
>    ...
>    p = p.getSuperclass();
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list