[
https://jira.codehaus.org/browse/QDOX-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte resolved QDOX-236.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.0
Assignee: Robert Scholte
Fixed in [rev. 1293|http://fisheye.codehaus.org/changelog/qdox/?cs=1293]
Please verify it and close the issue if it is valid.
> 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