RFR: 8375567: Remove AppContext usage from Swing Motif L&F classes [v2]
Phil Race
prr at openjdk.org
Mon Jan 26 21:19:38 UTC 2026
On Tue, 20 Jan 2026 23:48:30 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> True that createUI returns a ComponentUI, but the proposed code makes it clear what is the actual type, and the removed code used MotifToggleButtonUI too, even thought it could have used ComponentUI
>> No extra cost to this.
>
>>No extra cost to this.
>
> The cost is the size of the monitor =(
> `private static final ComponentUI INSTANCE = new MotifToggleButtonUI();`
> fits well into the 80 chars per line, without loosing much information. And it seems that the object should always be used via createUI method anyway, in this class specifically and in all UI delegates.
Really, I don't see the problem, but if you want it shorter, now it is shorter.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29282#discussion_r2729271884
More information about the client-libs-dev
mailing list