Browse Source

Implement hashCode for MultiType.

To honour the Object.equals contract.
tags/rel_3_23_0_ga
nickl- 6 years ago
parent
commit
049879f903
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/main/javassist/bytecode/analysis/MultiType.java

+ 8
- 0
src/main/javassist/bytecode/analysis/MultiType.java View File

@@ -281,6 +281,14 @@ public class MultiType extends Type {

return resolved;
}
@Override
public int hashCode() {
if (resolved != null)
return resolved.hashCode();
return interfaces.keySet().hashCode();
}

public boolean equals(Object o) {
if (! (o instanceof MultiType))

Loading…
Cancel
Save