<AWT Dev> RFR: 8268113: Re-use Long.hashCode() where possible [v2]

Сергей Цыпанов github.com+10835776+stsypanov at openjdk.java.net
Wed Jun 2 16:31:56 UTC 2021


On Wed, 2 Jun 2021 14:51:35 GMT, liach <github.com+7806504+liach at openjdk.org> wrote:

>> Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8268113: Delegate to Double.hashCode()
>
> src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java line 115:
> 
>> 113:         public int hashCode() {
>> 114:             final long bits = Double.doubleToLongBits(doubleValue);
>> 115:             return Long.hashCode(bits);
> 
> This one and the `DoubleDV` one should actually delegate to `Double.hashCode`, which delegates to `Long.hashCode` after this change.

Good point, done!

-------------

PR: https://git.openjdk.java.net/jdk/pull/4309


More information about the awt-dev mailing list