Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-335

Fraction.hashCode() inconsistent with Fraction.equals()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: