On Wed, 6 Aug 2025 21:08:30 GMT, Clément de Tastes <d...@openjdk.org> wrote:

>> Clément de Tastes has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   remove additional space
>
> `com.sun.javafx.PlatformUtil::isHeadless` returns `true` for any case 
> matching `"headless"`, which is not what i provided in my original suggestion.
> So maybe we could reuse it :
> 
> 
>             if (userPlatform != null) {
>                 if (userPlatform.equals("macosx"))
>                     type = MAC;
>                 else if (userPlatform.equals("windows"))
>                     type = WINDOWS;
>                 else if (userPlatform.equals("linux"))
>                     type = GTK;
>                 else if (userPlatform.equals("gtk"))
>                     type = GTK;
>                 else if (userPlatform.equals("ios"))
>                     type = IOS;
>                 else
>                     if (PlatformUtil.isHeadless())
>                         type = HEADLESS;
>                     else
>                         type = userPlatform;
>                 return type;
>             }
> 
> 
> Makes the code a bit clumsy to me, but has the benefit of reusing logic.

@CodeSimcoe Feel free to integrate this PR at your convenience.

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

PR Comment: https://git.openjdk.org/jfx/pull/1864#issuecomment-3187820961

Reply via email to