RFR: 8318966: Some methods make promises about Java array element alignment that are too strong
Jorn Vernee
jvernee at openjdk.org
Tue Jan 23 18:27:31 UTC 2024
On Tue, 23 Jan 2024 14:30:08 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Good idea. Thanks
>
> Should we make these unaligned access modes throw ISE like before, when the given index is unaligned?
You mean `get` and `set`? They should never throw, as unaligned access is fine. For other access modes, we can never guarantee that an access is aligned, so UOE is appropriate. (IIRC this is mandated by existing spec. I'll try to find it again)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16681#discussion_r1463769755
More information about the core-libs-dev
mailing list