On Fri, 11 Sep 2026 20:25:14 GMT, Alexey Ivanov <[email protected]> wrote:

>> Matthias Baesken has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   WindowsLookAndFeel.isOnVista remove more calls
>
> src/java.desktop/share/classes/sun/swing/WindowsPlacesBar.java line 79:
> 
>> 77:         putClientProperty("JToolBar.isRollover", Boolean.TRUE);
>> 78: 
>> 79:         boolean isXPPlatform = (OSInfo.getOSType() == 
>> OSInfo.OSType.WINDOWS);
> 
> I wonder whether `isXPPlatform` is needed at all, seemingly 
> `WindowsPlacesBar` is a Windows-specific class.
> 
> We may remove `isXPPlatform` and hard-code the height, `buttonSize = new 
> Dimension(83, isXPPlatform ? 65 : 54)`, as if `isXPPlatform` is always 
> `true`. The class is used in `WindowsFileChooserUI` only, it should never be 
> instantiated on other platforms but Windows.

Looking at the sources
https://github.com/search?q=repo%3Aopenjdk%2Fjdk+WindowsLookAndFeel+path%3A%2F%5Esrc%5C%2F%2F&type=code
WindowsLookAndFeel is only used on Windows. However the string is checked at 
some places in shared code e.g.
https://github.com/openjdk/jdk/blob/2740ea7d5759f871761498f0ba5f688d630205f6/src/java.desktop/share/classes/javax/swing/UIManager.java#L409C26-L409C76

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/32419#discussion_r4013140642

Reply via email to