Fix comparison method for ConstantKey

This commit is contained in:
Sungho Lee 2018-08-28 09:47:09 +09:00
parent 762389c315
commit 2640b97b5d
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;
}