RFR: 8344059: Remove doPrivileged calls from windows platform sources in the java.desktop module [v4]

msternermxy duke at openjdk.org
Fri Nov 15 22:11:49 UTC 2024


On Fri, 15 Nov 2024 03:29:13 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Since JEP 486 : Permanently Disable the Security Manager
>> [https://bugs.openjdk.org/browse/JDK-8338625] is now integrated, calls to java.security.AccessController.doPrivileged are obsolete and can be removed. 
>> 
>> This PR takes care of the windows-platform files in the java.desktop module to have them removed.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review comment

src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java line 71:

> 69:         Boolean.getBoolean(System.getProperty("sun.java2d.twp.forceopt", "false"));
> 70:     private static final boolean forceSW  =
> 71:         Boolean.getBoolean(System.getProperty("sun.java2d.twp.forcesw", "false"));

This seems to mistakenly combine `Boolean.getBoolean()` and `System.getProperty()`, instead of only using the former or using `Boolean.parseBoolean()` with the latter. Same issue above for `forceOpt`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1844523693


More information about the client-libs-dev mailing list