Description
`hashCode` function should consider all fields to distinguish objects. This issue fixes the `hashCode` function of `ConstructorDefImpl` class to consider `className` and `args` together.
ConstructorDefImpl.java
public int hashCode() { final ConstructorArg[] argsSort = getArgs().clone(); Arrays.sort(argsSort); - return Arrays.hashCode(argsSort); + int result = Arrays.hashCode(argsSort); + result = 31 * result + (this.className == null ? 0 : this.className.hashCode()); + return result; }
Attachments
Issue Links
- links to