[ https://jira.codehaus.org/browse/QDOX-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=276033#comment-276033 ]
Robert Scholte commented on QDOX-236: ------------------------------------- Fixed in [rev. 1296| http://fisheye.codehaus.org/changelog/qdox/?cs=1296] Just made me realize that I have to review all the equals() as well. > HashCode is invalid > ------------------- > > Key: QDOX-236 > URL: https://jira.codehaus.org/browse/QDOX-236 > Project: QDox > Issue Type: Bug > Components: Java API > Affects Versions: 1.12 > Reporter: Lars K. W. Gohlke > Assignee: Robert Scholte > Fix For: 2.0 > > > at least in class JavaMethod > {code} > public int hashCode() { > int hashCode = name.hashCode(); > if (returns != null) hashCode *= returns.hashCode(); > hashCode *= getParameters().length; > return hashCode; > } > {code} > when parameter.set has zero length, hashcode turns to be zero as well > this affects usage in Maps > improvement would be to use: > http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/builder/HashCodeBuilder.html > this could be also wrong in other classes -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email