tern.java icon indicating copy to clipboard operation
tern.java copied to clipboard

equals(Object obj)" and "hashCode()" should be overridden in pairs

Open AymanDF opened this issue 9 years ago • 3 comments

This pull request is focused on resolving occurrences of Sonar rule squid:S1206 - “ equals(Object obj)" and "hashCode()" should be overridden in pairs ”. You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S1206 Please let me know if you have any questions. Ayman Abdelghany.

AymanDF avatar Feb 09 '16 10:02 AymanDF

@piotrtomiak is it OK for you?

angelozerr avatar Feb 10 '16 22:02 angelozerr

@piotrtomiak is it OK for you?

angelozerr avatar Feb 19 '16 16:02 angelozerr

Sorry, forgot to reply for the first time. Basically, if one cares about overriding hash code method, it should work the same as equals method: a.equals(b) == ( a.hashCode() == b.hashCode()).

piotrtomiak avatar Feb 22 '16 08:02 piotrtomiak