On Mon, 17 Jul 2023 10:59:42 GMT, Pavel Rappo <[email protected]> wrote:
>> src/java.base/share/classes/sun/security/x509/OtherName.java line 212:
>>
>>> 210: public int hashCode() {
>>> 211: if (myhash == -1) {
>>> 212: myhash = 37 + oid.hashCode() + Arrays.hashCode(nameValue);
>>
>> I think you can drop 37 here. Either that, or use `37 * oid.hashCode()`.
>
> You think it was a typo (+ instead of *) in the original code?
The original code calculated `(37 **
nameValue.length)*(37+oid.hashCode)+Arrays.hashCode`; since you already dropped
the multiplication, you can also drop the addition.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14738#discussion_r1265190084