<i18n dev> RFR: 8268113: Re-use Long.hashCode() where possible

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


On Wed, 2 Jun 2021 14:10:38 GMT, Сергей Цыпанов <github.com+10835776+stsypanov at openjdk.org> wrote:

> There is a few JDK classes duplicating the contents of Long.hashCode() for hash code calculation. They should explicitly delegate to Long.hashCode().

src/java.base/share/classes/java/util/BitSet.java line 1040:

> 1038:             h ^= words[i] * (i + 1);
> 1039: 
> 1040:         return Long.hashCode(h);

Here `>>` instead of `>>>` in original code seems to be a typo

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

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


More information about the i18n-dev mailing list