diff options
author | nickl- <github@jigsoft.co.za> | 2017-10-30 06:22:57 +0200 |
---|---|---|
committer | nickl- <github@jigsoft.co.za> | 2017-10-30 06:27:18 +0200 |
commit | e141a58af0f72df5d8f6a685b55963b5f2f044dc (patch) | |
tree | 7558aee71a971800d2e894b99faca48ac7a9412d /src | |
parent | e091603310b29bdc00e1524579322e08d1a61ab3 (diff) | |
download | javassist-e141a58af0f72df5d8f6a685b55963b5f2f044dc.tar.gz javassist-e141a58af0f72df5d8f6a685b55963b5f2f044dc.zip |
Implement hashCode for MultiArrayType.
To honour the Object.equals contract.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/bytecode/analysis/MultiArrayType.java | 6 |
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; |