On Wed, 11 Mar 2026 21:14:43 GMT, Alexey Ivanov <[email protected]> wrote:
> The second part ensures `((offset + i) >= 0)`, doesn't it?
Once we've ensured i >= 0, yes
> If the offset is negative, the exception could be confusing… because the
> reported index in the message will be positive.
I was trying to be succinct. I can split the test
> src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java line 222:
>
>> 220: Objects.requireNonNull(offsets, "offsets must not be null");
>> 221: if (dataArray.length != offsets.length) {
>> 222: throw new ArrayIndexOutOfBoundsException("Must be an
>> offsets entry for every bank");
>
> Should it be *“an offset entry*”? In singular.
It an entry in the array of offsets, so plural seems fine to me.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r2921312525
PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r2921275365