Skip to content

Commit

Permalink
Use Arrays.hashCode to hash array fields
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Apr 16, 2024
1 parent c4ebd52 commit 9494106
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ public boolean equals(Object o)
@Override
public int hashCode()
{
return Objects.hash(min, max, size, containsEmptyMarker, hashTable, nullAllowed);
return Objects.hash(min, max, size, containsEmptyMarker, Arrays.hashCode(hashTable), nullAllowed);
}

@Override
Expand Down Expand Up @@ -1080,7 +1080,7 @@ public boolean testLength(int length)
@Override
public int hashCode()
{
return Objects.hash(lower, lowerExclusive, upper, upperExclusive, nullAllowed);
return Objects.hash(Arrays.hashCode(lower), lowerExclusive, Arrays.hashCode(upper), upperExclusive, nullAllowed);
}

public boolean isSingleValue()
Expand Down Expand Up @@ -1241,7 +1241,7 @@ public boolean equals(Object o)
@Override
public int hashCode()
{
return Objects.hash(values, nullAllowed);
return Objects.hash(Arrays.hashCode(values), nullAllowed);
}

@Override
Expand Down Expand Up @@ -1383,7 +1383,7 @@ public boolean equals(Object o)
@Override
public int hashCode()
{
return Objects.hash(ranges, nullAllowed);
return Objects.hash(Arrays.hashCode(ranges), nullAllowed);
}

@Override
Expand Down Expand Up @@ -1502,7 +1502,7 @@ public boolean equals(Object o)
@Override
public int hashCode()
{
return Objects.hash(filters, nullAllowed, nanAllowed);
return Objects.hash(Arrays.hashCode(filters), nullAllowed, nanAllowed);
}

@Override
Expand Down

0 comments on commit 9494106

Please sign in to comment.