On Mon, 17 Jul 2023 10:15:18 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:
>> Pavel Rappo has updated the pull request incrementally with five additional >> commits since the last revision: >> >> - Feedback: avoid intermediate assignments >> - More previously missed cases >> - Fix: log hashCode as an unsigned long >> >> If they don't match, this test fails: >> test/jdk/jdk/security/logging/TestX509ValidationLog.java >> - Fix: match hashCode implementations >> >> hashCode in the included classes must match that of >> javax.crypto.spec.SecretKeySpec.hashCode. >> >> If they don't match, this test fails: >> test/jdk/javax/crypto/KeyGenerator/CompareKeys.java >> - Fix: revert short-circuiting when destroyed >> >> That change caused this test to fail: >> test/jdk/javax/security/auth/kerberos/KerberosHashEqualsTest.java > > 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? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14738#discussion_r1265187193