Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Fraction.hashCode() is inconsistent with Fraction.equals().
hashCode() uses getNumerator() (which is not final) rather than directly accessing the field.
Seems to me that hashCode() has no reason to use the getters - or if it does, then equals should do so too.