simplified hashCode for nullable arrays (IDEA-144775)

This commit is contained in:
Anna Kozlova
2015-09-04 17:46:13 +03:00
parent b06b1c0720
commit 1b70e296eb
4 changed files with 16 additions and 15 deletions
@@ -20,9 +20,9 @@ class Test {
}
public int hashCode() {
int result = myOs != null ? Arrays.hashCode(myOs) : 0;
result = 31 * result + (myIIs != null ? Arrays.deepHashCode(myIIs) : 0);
result = 31 * result + (myIs != null ? Arrays.hashCode(myIs) : 0);
int result = Arrays.hashCode(myOs);
result = 31 * result + Arrays.deepHashCode(myIIs);
result = 31 * result + Arrays.hashCode(myIs);
return result;
}
}