[weld-issues] [JBoss JIRA] Created: (WELD-533) NPE occurs in AnnotationLiteral.hashCode() and .equals() when any field has a null value.

Lincoln Baxter III (JIRA) jira-events at lists.jboss.org
Wed May 26 13:41:55 EDT 2010


NPE occurs in AnnotationLiteral.hashCode() and .equals() when any field has a null value.
-----------------------------------------------------------------------------------------

                 Key: WELD-533
                 URL: https://jira.jboss.org/browse/WELD-533
             Project: Weld
          Issue Type: Bug
          Components: CDI API
    Affects Versions: 1.0.1.Final
         Environment: Anything using Weld Api
            Reporter: Lincoln Baxter III


AnnotationLiteral.hashCode() can result in NPE if the value itself is null. (See original thread: http://www.seamframework.org/Community/AnnotationLiteralThrowsNPEOnGlassfishV3SeamFaces#comment129086)

Value should not be included in the calculation of hashCode() or equals() if it is null. There should be some additional != null protection ;)

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

        


More information about the weld-issues mailing list