Merge pull request #345 from SunghoLee/master

Fix the comparison method for ConstantKey
This commit is contained in:
Julian Dolby 2018-08-27 21:47:46 -04:00 committed by GitHub
commit d13a38fbe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public final class ConstantKey<T> implements InstanceKey {
public boolean equals(Object obj) {
if (obj instanceof ConstantKey) {
ConstantKey other = (ConstantKey) obj;
return value == null ? other.value == null : value.equals(other.value);
return valueClass.equals(other.valueClass) ? (value == null ? other.value == null : value.equals(other.value)) : false;
} else {
return false;
}