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

Alexey Ivanov aivanov at openjdk.org
Fri Aug 1 20:23:07 UTC 2025


On Fri, 1 Aug 2025 20:09:21 GMT, Phil Race <prr at openjdk.org> wrote:

>> @prrace Any objection to my suggestion of statement? I guess that is succinct and describe what's the end result!!
>> `no exceptions will be thrown but the image will behave as if unset/uninitialized/null` doesn't sound right in my opinion as then user need to know "how it would behave" when image is unset or null which is basically image icon not getting rendered so I thought to cut the chase and describe the final result
>
>> “will behave as if the image is null”
> 
> That's got the same mention of null that Joe was questioning
> 
>>"no exceptions will be thrown but no image icon will be rendered"
> 
> That seems OK to me. I'd just drop the word 'icon'.

To make things clearer, we may mention that the `getImage` method will return a non-null value, yet no image will be rendered because `{@link #getImageLoadStatus()}` will report `{@code MediaTracker.ERRORED}`.

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

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


More information about the client-libs-dev mailing list