summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authornickl- <github@jigsoft.co.za>2017-10-30 06:42:35 +0200
committernickl- <github@jigsoft.co.za>2017-10-30 06:42:35 +0200
commitf536ea9fc9292811b6c151a479bab75eb2fc9d93 (patch)
tree4d09addda15c6204ed7fb088dfb6fe208e719f00 /src/main
parent049879f90350a37eb64d2dd04087fdf47a5ceddf (diff)
downloadjavassist-f536ea9fc9292811b6c151a479bab75eb2fc9d93.tar.gz
javassist-f536ea9fc9292811b6c151a479bab75eb2fc9d93.zip
Implement hashCode for Type.
To honour the Object.equals contract.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/javassist/bytecode/analysis/Type.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/javassist/bytecode/analysis/Type.java b/src/main/javassist/bytecode/analysis/Type.java
index ce02c172..9b2dc63b 100644
--- a/src/main/javassist/bytecode/analysis/Type.java
+++ b/src/main/javassist/bytecode/analysis/Type.java
@@ -567,6 +567,11 @@ public class Type {
return map;
}
+ @Override
+ public int hashCode() {
+ return getClass().hashCode() + clazz.hashCode();
+ }
+
public boolean equals(Object o) {
if (! (o instanceof Type))
return false;