Details
Description
at least in class JavaMethod
public int hashCode() { int hashCode = name.hashCode(); if (returns != null) hashCode *= returns.hashCode(); hashCode *= getParameters().length; return hashCode; }
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
Activity
Robert Scholte
made changes -
Field | Original Value | New Value |
---|---|---|
Description |
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 |
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 |
Robert Scholte
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Assignee | Robert Scholte [ rfscholte ] | |
Fix Version/s | 2.0 [ 15636 ] | |
Resolution | Fixed [ 1 ] |