Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8226930

Recheck equals and hashCode contract for classes that override them

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: openjfx14
    • Component/s: javafx
    • Labels:
      None

      Description

      Some classes in JavaFX override equals and hashCode, but do not specify in their docs what the new equality definition is based on (which fields).

      Furthermore, some implementations are inaccurate. For example, Point2D and Point3D do floating-point equality test with ==. This does not account for NaN, +0.0 and -0.0 comparisons. If for the purpose of points we decide that -0.0==+0.0 then is should be documented. Possibly, NaN should not be allowed in the first place.

      These need to be rechecked and corrected.

        Attachments

          Activity

            People

            • Assignee:
              nlisker Nir Lisker
              Reporter:
              nlisker Nir Lisker
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: