On Mon, 18 Nov 2024 20:18:39 GMT, Harshitha Onkar <[email protected]> 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/X11/XFileDialogPeer.java line 152:

> 150:         // Shouldn't save 'user.dir' to 'savedDir'
> 151:         // since getDirectory() will be incorrect after handleCancel
> 152:         userDir =  System.getProperty("user.dir");

Suggestion:

        userDir = System.getProperty("user.dir");

src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java line 96:

> 94:                 }
> 95: 
> 96:                 if(xProp.equalsIgnoreCase("t") || 
> xProp.equalsIgnoreCase("true")) {

Suggestion:

                if (xProp.equalsIgnoreCase("t") || 
xProp.equalsIgnoreCase("true")) {

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

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

Reply via email to