RFR: 8304912: Use OperatingSystem enum in java.desktop module [v6]

Andrey Turbanov aturbanov at openjdk.org
Tue Apr 11 06:57:37 UTC 2023


On Mon, 10 Apr 2023 16:56:43 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Update classes in the java.desktop module to use the jdk.internal.util.OperatingSystem enum instead of the `os.name` system property to select OS specific behaviors.
>
> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Revert copyright in unmodified file

src/java.desktop/share/classes/sun/awt/OSInfo.java line 83:

> 81:     }
> 82: 
> 83:     private static final PrivilegedAction<OSType> osTypeAction = new PrivilegedAction<OSType>() {

As this field is not used in production code anymore, I think it makes sense to inline it (allocate directly in `sun.awt.OSInfo#getOSTypeAction`)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13213#discussion_r1162374596



More information about the client-libs-dev mailing list