[jboss-jira] [JBoss JIRA] Updated: (JASSIST-56) NPE on Annotation.equals()
Guy Korland (JIRA)
jira-events at lists.jboss.org
Mon Mar 17 17:45:51 EDT 2008
[ http://jira.jboss.com/jira/browse/JASSIST-56?page=all ]
Guy Korland updated JASSIST-56:
-------------------------------
Description:
The marked line might throw NPE if both members==null and other.members==null
if (members == null && other.members != null)
return false;
if (members != null && other.members == null)
return false;
--> return members.equals(other.members);
The fix might be:
return members == other.members || members.equals(other.members);
was:
if (members == null && other.members != null)
return false;
if (members != null && other.members == null)
return false;
--> return members.equals(other.members);
Complexity: Low
> NPE on Annotation.equals()
> --------------------------
>
> Key: JASSIST-56
> URL: http://jira.jboss.com/jira/browse/JASSIST-56
> Project: Javassist
> Issue Type: Bug
> Reporter: Guy Korland
> Assigned To: Shigeru Chiba
>
> The marked line might throw NPE if both members==null and other.members==null
> if (members == null && other.members != null)
> return false;
> if (members != null && other.members == null)
> return false;
> --> return members.equals(other.members);
> The fix might be:
> return members == other.members || members.equals(other.members);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list