On Tue, 24 Feb 2026 17:02:27 GMT, Alexey Ivanov <[email protected]> wrote:
> During the discussions in https://github.com/openjdk/jdk/pull/29433, I looked > at the source code of `MediaTracker` and found several issues for cleaning up. > > - The `target` field in `MediaTracker` is initialised in the constructor, > it's never changed; > - The visibility of the `head` field in `MediaTracker` can be reduced to > `private`; > - The `tracker` and `ID` fields in the `MediaEntry` class are never changed > after being set in the constructor, therefore it's `final`; > - The `getID` method of `MediaEntry` should be `final`, subclasses shouldn't > be able to change the returned id; > - The fields in `ImageMediaEntry`—`image`, `width` and `height`—can also be > `final`. > - The `ImageMediaEntry` class itself is `final`. > > Additionally, I added the `@Override` annotation to overridden methods. Marked as reviewed by serb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29899#pullrequestreview-3849388277
