On Tue, 20 Jan 2026 23:48:30 GMT, Sergey Bylokhov <[email protected]> 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
