On Wed, 11 Mar 2026 21:48:12 GMT, Alexey Ivanov <[email protected]> wrote:

>> src/java.desktop/share/classes/java/awt/image/DataBufferByte.java line 225:
>> 
>>> 223:         checkSize(size);
>>> 224:         checkNumBanks(dataArray.length);
>>> 225:         Objects.requireNonNull(offsets, "offsets");
>> 
>> Suggestion:
>> 
>>         Objects.requireNonNull(offsets, "offsets must not be null");
>> 
>> 
>> For consistency with the message for `dataArray`.
>
> Remove the explicit check for `offsets == null`, too?
> 
> It will be implicitly checked at `dataArray.length != offsets.length` on the 
> next line of code.

But then I'd lose the custom message, so I prefer to keep it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r2921272790

Reply via email to