RFR: 8376627: Remove AppContext from javax/swing/plaf/metal classes [v2]
Sergey Bylokhov
serb at openjdk.org
Mon Feb 2 23:14:36 UTC 2026
On Mon, 2 Feb 2026 20:21:43 GMT, Phil Race <prr at openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBumps.java line 52:
>>
>>> 50: protected Color backColor;
>>> 51:
>>> 52: private static final List<BumpBuffer> BUMPS_LIST = new ArrayList<BumpBuffer>();
>>
>> This doesn’t seem to be a constant, does it? I think at some point we should implement some kind of cleanup logic for this list.
>
> The list is constant. The contents are added to.
> I suppose (some day) something like a soft ref could be used, but I am not sure that there will ever be stale members to make it worthwhile or appropriate.
> Either way, out of scope for this change.
If it is not a constant should we still use BUMPS_LIST? By constant I mean something that does not change and we can return it from the methods as it is without cloning/etc. This looks like just a field stored as static final.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29474#discussion_r2756417674
More information about the client-libs-dev
mailing list