This repository has been archived by the owner. It is now read-only.

Solandra #71

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+5 −2
Split
View
@@ -16,13 +16,16 @@ public Pair(T1 left, T2 right)
@Override
public final int hashCode()
{
- int hashCode = 31 + (left == null ? 0 : left.hashCode());
- return 31*hashCode + (right == null ? 0 : right.hashCode());
+ return Objects.hashCode(left, right);
}
@Override
public final boolean equals(Object o)
{
+ if (o == null)
+ return false;
+ if (this == o)
+ return true;
if(!(o instanceof Pair))
return false;
Pair that = (Pair)o;