RFR: 8159055: ImageIcon setImage and constructor can't handle null parameter [v5]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jun 18 03:44:28 UTC 2025


On Wed, 18 Jun 2025 03:31:49 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> I have expanded for those methods where there is code change for NULL interception....Not sure about others..
>
> Note that "ImageIcon(URL location)" will throw npe as well, do we want to ignore it or specify NPE? That is actually interesting question since initially some of methods throw NPE and another ignore the image.

ImageIcon(URL) will call ImageIcon(URL, String) where already image null check was there so I guess it will not throw NPE before fix too..

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25767#discussion_r2153572809


More information about the client-libs-dev mailing list