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

Phil Race prr at openjdk.org
Thu Nov 14 04:46:24 UTC 2024


On Wed, 13 Nov 2024 17:41:48 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.

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/AnimationController.java line 28:

> 26: package com.sun.java.swing.plaf.windows;
> 27: 
> 28: import sun.security.action.GetBooleanAction;

Still needed ?

src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/AnimationController.java line 71:

> 69:     @SuppressWarnings("removal")
> 70:     private static final boolean VISTA_ANIMATION_DISABLED =
> 71:         Boolean.parseBoolean(System.getProperty("swing.disablevistaanimation"));

remove @SuppressWarnings("removal") ?
Boolean.getBoolean ?

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

> 67:     // REMIND: we probably would want to remove this later
> 68:     private static final boolean forceOpt  =
> 69:         Boolean.parseBoolean(System.getProperty("sun.java2d.twp.forceopt", "false"));

Boolean.getBoolean ?

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

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

Boolean.getBoolean ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1841548349
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1841547689
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1841549225
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1841549383


More information about the client-libs-dev mailing list