RFR: 8376420: Remove AppContext from javax/swing/ImageIcon.java [v2]

Alexey Ivanov aivanov at openjdk.org
Thu Jan 29 17:40:51 UTC 2026


On Wed, 28 Jan 2026 21:06:27 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> > Does an app need direct access to the `MediaTracker` that's used to download the image? Probably not, therefore a private member is better.
> 
> The application will have this access via getter already

I'm confused… Where's a getter in `ImageIcon` that an app can use to get a `MediaTracker` instance?

The `getTracker` method is *private*.

> the problematic part here is access to the Component which is mutable so we cannot use it via final field.

The `component` field is *final*.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29433#discussion_r2742775613


More information about the client-libs-dev mailing list