On Wed, 19 Oct 2022 12:52:33 GMT, Nir Lisker <nlis...@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