<i18n dev> RFR: 8268113: Re-use Long.hashCode() where possible [v3]
Сергей Цыпанов
github.com+10835776+stsypanov at openjdk.java.net
Wed Jun 2 16:37:51 UTC 2021
On Wed, 2 Jun 2021 14:50:23 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: Inline local vars where reasonable
>
> src/java.base/share/classes/java/lang/Double.java line 881:
>
>> 879: public static int hashCode(double value) {
>> 880: long bits = doubleToLongBits(value);
>> 881: return Long.hashCode(bits);
>
> Imo these should be squashed to just
>
> return Long.hashCode(doubleToLongBits(value));
>
> since the local variable is no longer meaningful. Previously, they were required as they were retrieved twice in hash code calculation.
>
> Same for other usages.
Done!
-------------
PR: https://git.openjdk.java.net/jdk/pull/4309
More information about the i18n-dev
mailing list