On Mon, 23 Feb 2026 22:30:16 GMT, Phil Race <[email protected]> wrote:

>> src/java.desktop/share/classes/java/awt/image/DataBuffer.java line 571:
>> 
>>> 569:     }
>>> 570: 
>>> 571:     static final void checkNullArray(Object array, String name) {
>> 
>> Do we need this, or can it be replaced with Objects.requireNonNull? 
>> Alternatively, can we rely on implicit null checks when checking the size of 
>> the array? I think that would produce similar behavior to this method.
>
> This was already raised and my response is that I want the custom message and 
> also don't want to rely on implicit null.

There is a requireNonNull version with custom message, why this new one is 
better than in Objects?

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

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

Reply via email to