RFR: 8159055: Clarify handling of null and invalid image data for ImageIcon constructors and setImage method [v24]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jul 30 04:30:02 UTC 2025


On Tue, 29 Jul 2025 20:30:08 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/ImageIcon.java line 68:
>> 
>>> 66:  * If the image source parameter to a constructor or method is non-null,
>>> 67:  * but does not reference valid accessible image data,
>>> 68:  * no exceptions will be thrown but the image will be unset,
>> 
>> "will behave as if unset" ?
>> or maybe 
>> "will behave as if uninitialized " ?
>
> “will behave as if the image is null”?

My take is if we have to explain further, we can use 
"no exceptions will be thrown but no image icon will be rendered"

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

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


More information about the client-libs-dev mailing list