Integrated: 8259911: byteArrayViewVarHandle should throw ArrayIndexOutOfBoundsException

Claes Redestad redestad at openjdk.java.net
Wed Jan 20 23:45:49 UTC 2021


On Mon, 18 Jan 2021 12:09:23 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)

This pull request has now been integrated.

Changeset: 27cc62a5
Author:    Claes Redestad <redestad at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/27cc62a5
Stats:     534 lines in 30 files changed: 13 ins; 0 del; 521 mod

8259911: byteArrayViewVarHandle should throw ArrayIndexOutOfBoundsException

Reviewed-by: jvernee, mchung

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

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


More information about the hotspot-compiler-dev mailing list