RFR: 8377568: DataBuffer constructors and methods do not specify required exceptions [v7]
Phil Race
prr at openjdk.org
Mon Feb 23 22:33:18 UTC 2026
On Mon, 23 Feb 2026 22:28:06 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8377568
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29766#discussion_r2843405368
More information about the client-libs-dev
mailing list