You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Roland Kreuzer (Jira)" <ji...@apache.org> on 2022/06/27 11:42:00 UTC

[jira] [Comment Edited] (LANG-1686) Add Windows 11 detection to SystemUtils

    [ https://issues.apache.org/jira/browse/LANG-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17559128#comment-17559128 ] 

Roland Kreuzer edited comment on LANG-1686 at 6/27/22 11:41 AM:
----------------------------------------------------------------

Looks like OpenJDK made a change to fix the return value for _os.name_ on Windows 11.

The change is backported to Java LTS Versions 8, 11 and 17.

 

[https://bugs.openjdk.org/browse/JDK-8274737]

[https://github.com/openjdk/jdk/commit/97ea9dd2f24f9f1fb9b9345a4202a825ee28e014]

 

Since the checks in SystemUtils are based on the _os.name_ property, I'd guess this should simplify the issue.


was (Author: rolandkreuzer):
Looks like the OpenJDK just made a change to fix the return value for os.name on Windows 11.

From what I can see the change is backported to LTS Versions 8, 11 and 17.

 

[https://bugs.openjdk.org/browse/JDK-8274737]

[https://github.com/openjdk/jdk/commit/97ea9dd2f24f9f1fb9b9345a4202a825ee28e014]

 

Since the checks in SystemUtils are based on the os.name property, I'd guess this should simplify the issue.

> Add Windows 11 detection to SystemUtils
> ---------------------------------------
>
>                 Key: LANG-1686
>                 URL: https://issues.apache.org/jira/browse/LANG-1686
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Will Herrmann
>            Priority: Major
>
> [SystemUtils|https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/SystemUtils.html] contains static booleans such as {{{}IS_OS_WINDOWS_10{}}}.
> Now that Windows 11 has been out for a while, add {{{}IS_OS_WINDOWS_11{}}}.
> ----
> Note that [distinguishing Windows 11 from Windows 10 is complicated|https://stackoverflow.com/questions/69373447/is-there-an-official-way-to-detect-windows-11], so the current approach may not work for that.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)