JDK-8344058 : Remove doPrivileged calls from macos platform sources in the java.desktop module
  • Type: Bug
  • Component: client-libs
  • Affected Version: 24
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2024-11-12
  • Updated: 2024-11-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24Unresolved
Related Reports
Relates :  
Description
Since JEP 486 : Permanently Disable the Security Manager
[https://bugs.openjdk.org/browse/JDK-8338625] is now integrated, calls to java.security.AccessController.doPrivileged are obsolete and can be removed.

This bug enumerates macos-platform files in the java.desktop module that can have them removed.
The fix for this should focus on removing these, and exclude any refactoring, reformatting, or other clean up that is not required for this fix.
Any SM related imports that are no longer needed they should be removed.

Also avoid any other SecurityManager related clean up even in the same file.
Those will be addressed in follow-on bugs.

./macosx/classes/apple/laf/JRSUIUtils.java
./macosx/classes/sun/java2d/metal/MTLRenderQueue.java
./macosx/classes/sun/java2d/metal/MTLGraphicsConfig.java
./macosx/classes/sun/java2d/MacOSFlags.java
./macosx/classes/sun/awt/PlatformGraphicsInfo.java
./macosx/classes/sun/font/CFontManager.java
./macosx/classes/sun/lwawt/LWToolkit.java
./macosx/classes/sun/lwawt/LWComponentPeer.java
./macosx/classes/sun/lwawt/macosx/LWCToolkit.java
./macosx/classes/sun/lwawt/macosx/CTrayIcon.java
./macosx/classes/sun/lwawt/macosx/CFileDialog.java
./macosx/classes/sun/lwawt/macosx/CPrinterJob.java
./macosx/classes/sun/lwawt/macosx/CAccessibility.java
./macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
./macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
./macosx/classes/com/apple/eio/FileManager.java
./macosx/classes/com/apple/laf/AquaUtilControlSize.java
./macosx/classes/com/apple/laf/AquaLookAndFeel.java
./macosx/classes/com/apple/laf/AquaFileView.java
./macosx/classes/com/apple/laf/AquaUtils.java
./macosx/classes/com/apple/laf/ScreenMenu.java
./macosx/classes/com/apple/laf/AquaImageFactory.java
./macosx/classes/com/apple/laf/AquaMenuBarUI.java
./macosx/classes/com/apple/laf/AquaNativeResources.java

Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/22159 Date: 2024-11-15 18:45:11 +0000
15-11-2024