mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 03:24:58 +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
|
||||
public int hashCode() {
|
||||
return (getLeft() == null ? 0 : getLeft().hashCode()) ^
|
||||
(getMiddle() == null ? 0 : getMiddle().hashCode()) ^
|
||||
(getRight() == null ? 0 : getRight().hashCode());
|
||||
return Objects.hashCode(getLeft()) ^ Objects.hashCode(getMiddle()) ^ Objects.hashCode(getRight());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user