Re: RFR: 8376627: Remove AppContext from javax/swing/plaf/metal classes [v2]

2026-02-03 Thread Phil Race
On Mon, 2 Feb 2026 23:12:17 GMT, Sergey Bylokhov  wrote:

>> 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.

Ok I've changed the name to bumpsList

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29474#discussion_r2760834088


Re: RFR: 8376627: Remove AppContext from javax/swing/plaf/metal classes [v2]

2026-02-02 Thread Sergey Bylokhov
On Mon, 2 Feb 2026 20:21:43 GMT, Phil Race  wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBumps.java line 
>> 52:
>> 
>>> 50: protected Color backColor;
>>> 51: 
>>> 52: private static final List BUMPS_LIST = new 
>>> ArrayList();
>> 
>> 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


Re: RFR: 8376627: Remove AppContext from javax/swing/plaf/metal classes [v2]

2026-02-02 Thread Phil Race
On Thu, 29 Jan 2026 00:01:24 GMT, Sergey Bylokhov  wrote:

>> Phil Race has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8376627
>
> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBumps.java line 52:
> 
>> 50: protected Color backColor;
>> 51: 
>> 52: private static final List BUMPS_LIST = new 
>> ArrayList();
> 
> 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.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29474#discussion_r2756014560


Re: RFR: 8376627: Remove AppContext from javax/swing/plaf/metal classes [v2]

2026-01-28 Thread Sergey Bylokhov
On Wed, 28 Jan 2026 23:14:17 GMT, Phil Race  wrote:

>> Remove AppContext from Metal L&F
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8376627

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBumps.java line 52:

> 50: protected Color backColor;
> 51: 
> 52: private static final List BUMPS_LIST = new 
> ArrayList();

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.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29474#discussion_r2739136972


Re: RFR: 8376627: Remove AppContext from javax/swing/plaf/metal classes [v2]

2026-01-28 Thread Phil Race
> Remove AppContext from Metal L&F

Phil Race has updated the pull request incrementally with one additional commit 
since the last revision:

  8376627

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/29474/files
  - new: https://git.openjdk.org/jdk/pull/29474/files/07221d3c..99a78477

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29474&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29474&range=00-01

  Stats: 91 lines in 1 file changed: 91 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/29474.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29474/head:pull/29474

PR: https://git.openjdk.org/jdk/pull/29474