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

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Nov 15 14:22:12 UTC 2024


On Fri, 15 Nov 2024 12:31:02 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review comment
>
> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java line 186:
> 
>> 184:         // to be switched off either at runtime or programmatically
>> 185:         //
>> 186:         String systemFonts = System.getProperty("swing.useSystemFontSettings");
> 
> This file has a now-unused import of `GetPropertyAction`.

removed

> 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.getBoolean(System.getProperty("sun.java2d.twp.forceopt", "false"));
> 
> This file has a now-unused import of `GetPropertyAction`.

removed

> src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java line 62:
> 
>> 60: 
>> 61:     @SuppressWarnings("removal")
>> 62:     private static String printScale = System.getProperty("sun.java2d.print.pluginscalefactor");
> 
> You can get rid of the `@SuppressWarnings("removal")` here.
> 
> Also, this file has a now-unused import of `GetPropertyAction`.

removed

> src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java line 189:
> 
>> 187:             // if no system property is specified,
>> 188:             // check for environment setting
>> 189:             printScale = System.getenv("JAVA2D_PLUGIN_PRINT_SCALE");
> 
> Is the `@SuppressWarnings("removal")` on this method still needed?

removed

> src/java.desktop/windows/classes/sun/awt/windows/WFramePeer.java line 83:
> 
>> 81: 
>> 82:     private static final boolean keepOnMinimize = "true".equals(
>> 83:             System.getProperty("sun.awt.keepWorkingSetOnMinimize"));
> 
> This file has a now-unused import of `GetPropertyAction`.

removed

> src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java line 220:
> 
>> 218: 
>> 219:         // Find a root TG and attach toolkit thread to it
>> 220:         ThreadGroup rootTG = ThreadGroupUtils.getRootThreadGroup();
> 
> Is the `@SuppressWarnings("removal")` on this constructor still needed?

removed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843900802
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843900907
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843901035
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843901447
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843901219
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1843901593


More information about the client-libs-dev mailing list