diff options
author | nickl- <github@jigsoft.co.za> | 2017-10-30 06:42:35 +0200 |
---|---|---|
committer | nickl- <github@jigsoft.co.za> | 2017-10-30 06:42:35 +0200 |
commit | f536ea9fc9292811b6c151a479bab75eb2fc9d93 (patch) | |
tree | 4d09addda15c6204ed7fb088dfb6fe208e719f00 /src/main | |
parent | 049879f90350a37eb64d2dd04087fdf47a5ceddf (diff) | |
download | javassist-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.java | 5 |
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; |