Change 'hashCode' of 'TypeProjection'
according to bug when there was exception in `hashCode` call when projection has some `SpecialType` like `NO_EXPECTED_TYPE`
This commit is contained in:
@@ -46,7 +46,11 @@ public abstract class TypeProjectionBase implements TypeProjection {
|
|||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int result = getProjectionKind().hashCode();
|
int result = getProjectionKind().hashCode();
|
||||||
result = 31 * result + (isStarProjection() ? 17 : getType().hashCode());
|
if (TypeUtils.noExpectedType(getType())) {
|
||||||
|
result = 31 * result +19;
|
||||||
|
} else {
|
||||||
|
result = 31 * result + (isStarProjection() ? 17 : getType().hashCode());
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user