RFR: 8259911: byteArrayViewVarHandle should throw ArrayIndexOutOfBoundsException [v2]
mchung at openjdk.java.net
Wed Jan 20 18:52:00 UTC 2021
On Wed, 20 Jan 2021 18:47:18 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> Change `MethodHandles.byteArrayViewVarHandle` to throw `ArrayIndexOutOfBoundsException` rather than the more generic `IndexArrayOutOfBoundsException`. This feels more natural, and reduces the risk for subtle behavioral mismatch when migrating code from arrays/Unsafe to VHs.
>> CSR: [JDK-8259912](https://bugs.openjdk.java.net/browse/JDK-8259912)
> Claes Redestad 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 four additional commits since the last revision:
> - Update VarHandles tests to check for AIOOBE specifically when appropriate
> - Copyrights
> - Merge branch 'master' into vh_aioobe
> - byteArrayViewVarHandle should throw ArrayIndexOutOfBoundsException
Looks good. Thanks for updating the test.
Marked as reviewed by mchung (Reviewer).
More information about the core-libs-dev