equals inconsistent with hashCode in AffineTransform

Kevin Rushforth kevin.rushforth at oracle.com
Mon Jul 25 12:20:45 UTC 2022


Your pull request is not yet ready for review (RFR), since it is not 
associated with a JBS bug ID, so it is unlikely that reviewers on this 
list are looking at it. You can file a bug against "Client Libraries" / 
"2d" at https://bugreport.java.com/ (or find a sponsor on this list who 
is willing to file it for you), and then change the title of your PR to 
include that bug ID in the title. See 
https://openjdk.org/guide/#life-of-a-pr for how to format your title.

Once your PR is RFR, you can expect that there will be some discussion 
on it, since you propose to change the implementation of equals, rather 
than limiting your change to the implementation of hashCode.

-- Kevin


On 7/25/2022 5:04 AM, Martin Desruisseaux wrote:
> Hello
>
> I'm not sure if the pull request below has been noticed, since I have 
> not seen evaluation. This is about the equals(Object) method being 
> inconsistent with hashCode() in the AffineTransform class. This bug 
> prevents the use of AffineTransform as keys in HashMap, unless 
> AffineTransform construction is well-controlled or some workaround is 
> applied before any use as key.
>
> There is 2 different ways to fix this bug. The one proposed in current 
> pull request tries to minimize the behavioral change compared to 
> current implementation.
>
> https://github.com/openjdk/jdk/pull/9121
>
>         Martin
>
>




More information about the client-libs-dev mailing list