RFR: JDK-8295236: Update JavaDoc in javafx.geometry.Point3D [v5]
Kevin Rushforth
kcr at openjdk.org
Wed Oct 19 13:16:06 UTC 2022
On Wed, 19 Oct 2022 12:52:33 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
> It's not. I have mentioned this exact case in https://bugs.openjdk.org/browse/JDK-8226930. I can assign it to you (or self-assign it yourself) if you want to work on it. If not, I will get to it at some point (no pun intended). This issue will require to go over the classes that override equals and see if they do it properly, including `hashcode`. Sometimes the `equals` implementation is "good enough", so there's no need to rewrite it in all the classes, but especially for public APIs, users should expect correct implementations.
And it's not just a doc issue: Point3D (at least) violates the contract of `equals` and `hashCode`, since two objects that are considered `equals` can produce different hash codes (e.g., the case of two points, one of which has a value of `+0.0` for one of the coords, and the other of which has `-0.0` for the same coord). Depending on how we change it, it might need a CSR.
So I'd prefer that either you keep the bug or @arapte take it.
-------------
PR: https://git.openjdk.org/jfx/pull/913
More information about the openjfx-dev
mailing list