RFR: 8159055: ImageIcon.setImage can't handle null parameter [v22]

Alexey Ivanov aivanov at openjdk.org
Mon Jul 28 20:12:01 UTC 2025


On Mon, 28 Jul 2025 19:11:06 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   ArgType name change
>
> src/java.desktop/share/classes/javax/swing/ImageIcon.java line 68:
> 
>> 66:  * no exceptions will be thrown but the image will be unset,
>> 67:  * as it will have no dimensions and never be drawn, and
>> 68:  * {@code getImageLoadStatus()} will report {@see java.awt.MediaTracker#ERRORED}.
> 
> Suggestion:
> 
>  * {@code getImageLoadStatus()} will report {@link java.awt.MediaTracker#ERRORED}.
> 
> You shouldn't use `@see` here, it should either be `@code` or `@link`. I think both references should use the same tag: either `@code` or `@link`; the latter allows quickly navigating to the *method* or constant.
> 
> Perhaps, `@link` for the `getImageLoadStatus` method would work better: it allows viewing the description of the method and its purpose; in its turn, `getImageLoadStatus` references possible return values including `MediaTracker.ERRORED` with `@see` tag.

Indeed, this is not supported, the generated javadoc looks like this:

“…and `getImageLoadStatus()` will report .”

Therefore I suggest the following:


 * {@link #getImageLoadStatus()} will report {@code MediaTracker.ERRORED}.

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

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


More information about the client-libs-dev mailing list