RFR: JDK-8344057 : Remove doPrivileged calls from unix platform sources in the java.desktop module
Phil Race
prr at openjdk.org
Mon Nov 18 23:59:11 UTC 2024
On Mon, 18 Nov 2024 20:18:39 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> Post JEP-486 (Permanently Disable the Security Manager) cleanup.
> Calls to java.security.AccessController.doPrivileged are obsolete thus removed in this PR.
>
> This PR addresses removal of AccessController.doPrivileged() calls from unix-platform files in the java.desktop module. Any SM related imports that are no longer needed are removed.
>
> This PR is limited to removing doPrivileged() calls and excludes any refactoring, reformatting, or other clean up that is out-of-scope for this fix.
>
> PS: I have explicitly add comments to the changes where a more watchful review is required.
Changes requested by prr (Reviewer).
src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java line 376:
> 374: }
> 375: };
> 376: String name = "XToolkt-Shutdown-Thread";
I am noting that there's a pre-existing typo here. Not asking you to fix it.
src/java.desktop/unix/classes/sun/print/UnixPrintJob.java line 529:
> 527: PrinterOpener po = new PrinterOpener();
> 528: @SuppressWarnings("removal")
> 529: var dummy = java.security.AccessController.doPrivileged(po);
You are no longer running the action
src/java.desktop/unix/classes/sun/print/UnixPrintJob.java line 603:
> 601: PrinterSpooler spooler = new PrinterSpooler();
> 602: @SuppressWarnings("removal")
> 603: var dummy2 = java.security.AccessController.doPrivileged(spooler);
You are no longer running the action here as well
-------------
PR Review: https://git.openjdk.org/jdk/pull/22218#pullrequestreview-2443978288
PR Review Comment: https://git.openjdk.org/jdk/pull/22218#discussion_r1847437476
PR Review Comment: https://git.openjdk.org/jdk/pull/22218#discussion_r1847453169
PR Review Comment: https://git.openjdk.org/jdk/pull/22218#discussion_r1847453479
More information about the client-libs-dev
mailing list