RFR: JDK-8344057 : Remove doPrivileged calls from unix platform sources in the java.desktop module
Harshitha Onkar
honkar at openjdk.org
Tue Nov 19 01:03:50 UTC 2024
On Mon, 18 Nov 2024 23:55:20 GMT, Phil Race <prr 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.
>
> 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
I'm not sure if I understood it correctly: Did you mean remove `implements java.security.PrivilegedAction<Object>` from PrinterOpener class ?
> 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
Did you mean remove `implements java.security.PrivilegedAction<Object>` from PrinterSpooler class?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22218#discussion_r1847496184
PR Review Comment: https://git.openjdk.org/jdk/pull/22218#discussion_r1847497499
More information about the client-libs-dev
mailing list