RFR: 8159055: ImageIcon.setImage and ImageIcon(Image) constructor can't handle null parameter [v9]

Alexey Ivanov aivanov at openjdk.org
Thu Jun 19 10:13:34 UTC 2025


On Wed, 18 Jun 2025 22:21:22 GMT, Phil Race <prr at openjdk.org> wrote:

> Also that other constructor (which github won't let me comment on) installs the description even if the image is null.

I don't see it as a problem.

If the app developer wants to initialise the object with `null` image and a description, why don't we let them do it?

The image may be auto-generated and while it's generated, the image in `ImageIcon` remains `null`; when the image is read the app calls `ImageIcon.setImage` to the set now available image and *expects the description being preserved*.

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

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


More information about the client-libs-dev mailing list