-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctness: Overriding equals, but not hashCode #344
Labels
Comments
algoanne
added
bug
Something isn't working
good first issue
Good for newcomers
and removed
good first issue
Good for newcomers
new-bug
Bug report that needs triage
labels
May 23, 2023
For the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
While working on #340 (comment), I observed numerous instances where
equals
is overwritten, but nothashCode
.The status quo breaks
hashCode
's contract as discussed in https://stackoverflow.com/questions/2265503/why-do-i-need-to-override-the-equals-and-hashcode-methods-in-java.Your environment
N/A
Steps to reproduce
N/A
Expected behaviour
There's at least 2 solutions:
hashCode
andequals
. Prefer using an IDE-generated implementation.equals
andhashCode
implementations.Actual behaviour
N/A
Acceptance Criteria
The text was updated successfully, but these errors were encountered: