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:12 UTC 2024


On Mon, 18 Nov 2024 20:44:57 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.
>
> src/java.desktop/unix/classes/sun/awt/PlatformGraphicsInfo.java line 75:
> 
>> 73:         }
>> 74:         return headless;
>> 75:     }
> 
> Added break statement since we are no longer using return statement.

you could still have returned. you would then no longer need the headless var and the code would not be refactored any more than it it to be. But up to you.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22218#discussion_r1847424735


More information about the client-libs-dev mailing list