RFR: 8368729: Add appropriate checks in java.awt.image.Kernel constructor
Sergey Bylokhov
serb at openjdk.org
Sat Nov 8 01:11:16 UTC 2025
On Fri, 7 Nov 2025 09:41:57 GMT, Jayathirth D V <jdv at openjdk.org> wrote:
>NPE which was thrown before was undefined behaviour.
>There is no objection in CSR request also. I would like to continue keeping usage of IAE.
Most of the new code in the JDK throws NullPointerException for null arguments. We already had a similar discussion recently, and most of the same arguments apply here as well:
https://mail.openjdk.org/pipermail/client-libs-dev/2025-May/028879.html
https://github.com/openjdk/jdk/pull/24991/commits/040e8ddddc4d46b60d047f7f5fbe19a6c2c5683b
It also appears that this is the first usage of "@throws IllegalArgumentException" for null parameters in that package, but there are some usages of NPE for null.
>If majority of reviewers have objections, we can take it up in follow-up issue.
I have filed: https://bugs.openjdk.org/browse/JDK-8371501
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28127#discussion_r2505940997
More information about the client-libs-dev
mailing list