On Thu, 30 Apr 2026 18:59:38 GMT, Alexey Ivanov <[email protected]> wrote:
>> Phil Race has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> 8377568
>
> test/jdk/java/awt/image/DataBuffer/DataBufferConstructorTest.java line 543:
>
>> 541: static boolean failed = false;
>> 542:
>> 543: static final int[] zeroOffsetArray = { 0 } ;
>
> If `nullOffsets` was unused, you had missed adding a test that passes
> `nullOffsets` as parameter to a constructor that accepts an array of offsets.
> For example, this block at lines 589–597:
>
>
> // DataBufferByte(byte[][] dataArray, int size, int[] offsets)
>
>
> Other types are also affected.
tests added
> test/jdk/java/awt/image/DataBuffer/DataBufferConstructorTest.java line 557:
>
>> 555: final byte[][] nullByteArrays = null;
>> 556: final byte[][] zeroByteSubArrays = { zeroByteArray } ;
>> 557: final byte[][] oneByteSubArrays = { oneByteArray } ;
>
> Why is `nullByteSubArrays` removed?
>
> If it was unused, a test for the case where dataArrays[][] contains a bank
> that's null was missing.
>
> This applies for other types, for example, `nullShortSubArrays` is unused.
ok I've added tests for these
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r3170963391
PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r3170962849