Skip to content

Commit

Permalink
AdaptableTocsArray: fix hashCode()
Browse files Browse the repository at this point in the history
Did use identity hashcode.
see https://rules.sonarsource.com/java/RSPEC-2116
  • Loading branch information
EcljpseB0T authored and jukzi committed Jun 9, 2023
1 parent ef7d143 commit e8d29df
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ public boolean equals(Object object) {
}

AdaptableTocsArray res = (AdaptableTocsArray) object;
return (Arrays.equals(asArray(), res.asArray()));

return Arrays.equals(asArray(), res.asArray());
}

/**
Expand All @@ -102,7 +101,7 @@ public boolean equals(Object object) {
public int hashCode() {
if (element == null)
return -1;
return element.hashCode();
return Arrays.hashCode(element);
}
}

0 comments on commit e8d29df

Please sign in to comment.