From github.com+10835776+stsypanov at openjdk.java.net Thu Jul 1 10:38:28 2021 From: github.com+10835776+stsypanov at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Thu, 1 Jul 2021 10:38:28 GMT Subject: RFR: 8268764: Use Long.hashCode() instead of int-cast where applicable [v2] In-Reply-To: References: Message-ID: On Wed, 30 Jun 2021 11:49:51 GMT, ?????? ??????? wrote: >> In some JDK classes there's still the following hashCode() implementation: >> >> long objNum; >> >> public int hashCode() { >> return (int) objNum; >> } >> >> This outdated expression should be replaced with Long.hashCode(long) as it >> >> - uses all bits of the original value, does not discard any information upfront. For example, depending on how you are generating the IDs, the upper bits could change more frequently (or the opposite). >> >> - does not introduce any bias towards values with more ones (zeros), as it would be the case if the two halves were combined with an OR (AND) operation. >> >> See https://stackoverflow.com/a/4045083 >> >> This is related to https://github.com/openjdk/jdk/pull/4309 > > ?????? ??????? has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: > > - Merge branch 'master' into 8268764 > - 8268764: Use Long.hashCode() instead of int-cast where applicable Hi Kevin, thanks for review! I've updated copy-right year ------------- PR: https://git.openjdk.java.net/jdk/pull/4491 From github.com+10835776+stsypanov at openjdk.java.net Thu Jul 1 10:38:24 2021 From: github.com+10835776+stsypanov at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Thu, 1 Jul 2021 10:38:24 GMT Subject: RFR: 8268764: Use Long.hashCode() instead of int-cast where applicable [v3] In-Reply-To: References: Message-ID: > In some JDK classes there's still the following hashCode() implementation: > > long objNum; > > public int hashCode() { > return (int) objNum; > } > > This outdated expression should be replaced with Long.hashCode(long) as it > > - uses all bits of the original value, does not discard any information upfront. For example, depending on how you are generating the IDs, the upper bits could change more frequently (or the opposite). > > - does not introduce any bias towards values with more ones (zeros), as it would be the case if the two halves were combined with an OR (AND) operation. > > See https://stackoverflow.com/a/4045083 > > This is related to https://github.com/openjdk/jdk/pull/4309 ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: 8268764: Update copy-right year ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4491/files - new: https://git.openjdk.java.net/jdk/pull/4491/files/12a1d3ac..932c26ad Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4491&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4491&range=01-02 Stats: 6 lines in 6 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/4491.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4491/head:pull/4491 PR: https://git.openjdk.java.net/jdk/pull/4491 From kevinw at openjdk.java.net Thu Jul 1 11:39:00 2021 From: kevinw at openjdk.java.net (Kevin Walls) Date: Thu, 1 Jul 2021 11:39:00 GMT Subject: RFR: 8268764: Use Long.hashCode() instead of int-cast where applicable [v3] In-Reply-To: References: Message-ID: On Thu, 1 Jul 2021 10:38:24 GMT, ?????? ??????? wrote: >> In some JDK classes there's still the following hashCode() implementation: >> >> long objNum; >> >> public int hashCode() { >> return (int) objNum; >> } >> >> This outdated expression should be replaced with Long.hashCode(long) as it >> >> - uses all bits of the original value, does not discard any information upfront. For example, depending on how you are generating the IDs, the upper bits could change more frequently (or the opposite). >> >> - does not introduce any bias towards values with more ones (zeros), as it would be the case if the two halves were combined with an OR (AND) operation. >> >> See https://stackoverflow.com/a/4045083 >> >> This is related to https://github.com/openjdk/jdk/pull/4309 > > ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: > > 8268764: Update copy-right year Marked as reviewed by kevinw (Committer). OK, one more (C) in src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java and done. 8-) Needs a second Review before integrating, thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/4491 From github.com+10835776+stsypanov at openjdk.java.net Thu Jul 1 12:19:53 2021 From: github.com+10835776+stsypanov at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Thu, 1 Jul 2021 12:19:53 GMT Subject: RFR: 8268764: Use Long.hashCode() instead of int-cast where applicable [v4] In-Reply-To: References: Message-ID: > In some JDK classes there's still the following hashCode() implementation: > > long objNum; > > public int hashCode() { > return (int) objNum; > } > > This outdated expression should be replaced with Long.hashCode(long) as it > > - uses all bits of the original value, does not discard any information upfront. For example, depending on how you are generating the IDs, the upper bits could change more frequently (or the opposite). > > - does not introduce any bias towards values with more ones (zeros), as it would be the case if the two halves were combined with an OR (AND) operation. > > See https://stackoverflow.com/a/4045083 > > This is related to https://github.com/openjdk/jdk/pull/4309 ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: 8268764: Update copy-right year ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/4491/files - new: https://git.openjdk.java.net/jdk/pull/4491/files/932c26ad..20ad76be Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4491&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4491&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/4491.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4491/head:pull/4491 PR: https://git.openjdk.java.net/jdk/pull/4491 From github.com+10835776+stsypanov at openjdk.java.net Thu Jul 1 12:19:55 2021 From: github.com+10835776+stsypanov at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Thu, 1 Jul 2021 12:19:55 GMT Subject: RFR: 8268764: Use Long.hashCode() instead of int-cast where applicable [v3] In-Reply-To: References: Message-ID: On Thu, 1 Jul 2021 10:38:24 GMT, ?????? ??????? wrote: >> In some JDK classes there's still the following hashCode() implementation: >> >> long objNum; >> >> public int hashCode() { >> return (int) objNum; >> } >> >> This outdated expression should be replaced with Long.hashCode(long) as it >> >> - uses all bits of the original value, does not discard any information upfront. For example, depending on how you are generating the IDs, the upper bits could change more frequently (or the opposite). >> >> - does not introduce any bias towards values with more ones (zeros), as it would be the case if the two halves were combined with an OR (AND) operation. >> >> See https://stackoverflow.com/a/4045083 >> >> This is related to https://github.com/openjdk/jdk/pull/4309 > > ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: > > 8268764: Update copy-right year Right, done! ------------- PR: https://git.openjdk.java.net/jdk/pull/4491 From dcubed at openjdk.java.net Wed Jul 28 18:45:48 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 28 Jul 2021 18:45:48 GMT Subject: [jdk17] RFR: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java Message-ID: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java ------------- Commit messages: - 8271413: ProblemList 2 locale tests on macOS-x64 - 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java Changes: https://git.openjdk.java.net/jdk17/pull/291/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=291&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8271412 Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk17/pull/291.diff Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/291/head:pull/291 PR: https://git.openjdk.java.net/jdk17/pull/291 From naoto at openjdk.java.net Wed Jul 28 18:45:48 2021 From: naoto at openjdk.java.net (Naoto Sato) Date: Wed, 28 Jul 2021 18:45:48 GMT Subject: [jdk17] RFR: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java In-Reply-To: References: Message-ID: <4OxJyIjYmL7VipsbhwjpJi-1NdoZpud5c2HmLLJvqp0=.60816a97-a8fc-49f5-a0f7-74599ce623d9@github.com> On Wed, 28 Jul 2021 17:51:31 GMT, Daniel D. Daugherty wrote: > 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java Marked as reviewed by naoto (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk17/pull/291 From dcubed at openjdk.java.net Wed Jul 28 18:48:28 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 28 Jul 2021 18:48:28 GMT Subject: [jdk17] RFR: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java In-Reply-To: <4OxJyIjYmL7VipsbhwjpJi-1NdoZpud5c2HmLLJvqp0=.60816a97-a8fc-49f5-a0f7-74599ce623d9@github.com> References: <4OxJyIjYmL7VipsbhwjpJi-1NdoZpud5c2HmLLJvqp0=.60816a97-a8fc-49f5-a0f7-74599ce623d9@github.com> Message-ID: On Wed, 28 Jul 2021 18:42:11 GMT, Naoto Sato wrote: >> 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java > > Marked as reviewed by naoto (Reviewer). @naotoj - Thanks for the fast review! ------------- PR: https://git.openjdk.java.net/jdk17/pull/291 From dcubed at openjdk.java.net Wed Jul 28 18:56:33 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Wed, 28 Jul 2021 18:56:33 GMT Subject: [jdk17] Integrated: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java In-Reply-To: References: Message-ID: <6fzkDKaeX5rdBgxWZOF1kYGBK0pa6vxYSk15smZpdC8=.818f1405-3955-4746-a784-d4b68858f564@github.com> On Wed, 28 Jul 2021 17:51:31 GMT, Daniel D. Daugherty wrote: > 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java This pull request has now been integrated. Changeset: 7bf72ce3 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk17/commit/7bf72ce301de80f4126607c2ef51d6df8c5849cf Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java 8271413: ProblemList 2 locale tests on macOS-x64 Reviewed-by: naoto ------------- PR: https://git.openjdk.java.net/jdk17/pull/291