aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist
diff options
context:
space:
mode:
authornickl- <github@jigsoft.co.za>2017-10-30 06:22:57 +0200
committernickl- <github@jigsoft.co.za>2017-10-30 06:27:18 +0200
commite141a58af0f72df5d8f6a685b55963b5f2f044dc (patch)
tree7558aee71a971800d2e894b99faca48ac7a9412d /src/main/javassist
parente091603310b29bdc00e1524579322e08d1a61ab3 (diff)
downloadjavassist-e141a58af0f72df5d8f6a685b55963b5f2f044dc.tar.gz
javassist-e141a58af0f72df5d8f6a685b55963b5f2f044dc.zip
Implement hashCode for MultiArrayType.
To honour the Object.equals contract.
Diffstat (limited to 'src/main/javassist')
-rw-r--r--src/main/javassist/bytecode/analysis/MultiArrayType.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/analysis/MultiArrayType.java b/src/main/javassist/bytecode/analysis/MultiArrayType.java
index 1d1b90b0..493d65af 100644
--- a/src/main/javassist/bytecode/analysis/MultiArrayType.java
+++ b/src/main/javassist/bytecode/analysis/MultiArrayType.java
@@ -115,6 +115,12 @@ public class MultiArrayType extends Type {
return component.isAssignableTo(typeRoot);
}
+
+ @Override
+ public int hashCode() {
+ return component.hashCode() + dims;
+ }
+
public boolean equals(Object o) {
if (! (o instanceof MultiArrayType))
return false;