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

Recheck equals and hashCode contract for classes that override them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx13
    • javafx
    • None

      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.

            nlisker Nir Lisker
            nlisker Nir Lisker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: