mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 19:45:01 +00:00
Simplify null checks in Triple.hashCode() using Objects.hashCode(). (#516)
This commit is contained in:
parent
d7f8dcedfa
commit
c7ab53f9e3
@ -171,9 +171,7 @@ public boolean equals(final Object obj) {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return (getLeft() == null ? 0 : getLeft().hashCode()) ^
|
return Objects.hashCode(getLeft()) ^ Objects.hashCode(getMiddle()) ^ Objects.hashCode(getRight());
|
||||||
(getMiddle() == null ? 0 : getMiddle().hashCode()) ^
|
|
||||||
(getRight() == null ? 0 : getRight().hashCode());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user