On Mon, 31 Aug 2026 22:14:15 GMT, Phil Race <[email protected]> wrote:

>> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java
>>  line 1587:
>> 
>>> 1585: 
>>> 1586:     static boolean isOnWindows7() {
>>> 1587:         return OSInfo.getOSType() == OSInfo.OSType.WINDOWS
>> 
>> btw, we are these days always at least on Windows 7, so why not just return 
>> true in this method ?
>
> It is checking the OS type, ie making sure we aren't on Linux, so that's 
> still needed somewhere, but probably isn't needed here. We should be checking 
> that before instantiating the L&F.
> But pulling on the thread, if we only support win 7 and later, I don't see 
> the need to even have these methods at all.
> 
> Perhaps the Windows Classic L&F might need something like this in some 
> places, but this check is about the actual OS is, not what L&F variant we 
> want.

The coding is in file 
src/java.desktop/**windows**/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java‎
so I think we must be on windows when executing this code, correct ?
So no Linux check needs to be done here.

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

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

Reply via email to