-
CSR
-
Resolution: Approved
-
P3
-
minimal
-
-
Java API
-
SE
Summary
Change SecurityManager checkTopLevelWindow, checkSystemClipboard, checkAccessAwtEventQueueAccess to check AllPermission.
Problem
This is a follow-up to CCC-8008981 where we deprecated the checkTopLevelWindow, checkSystemClipboard and checkAccessAwtEventQueueAccess methods defined by java.lang.SecurityManager. The methods were deprecated with a warning to make it clear that they would be changed in a future release to check AllPermission.
The original CCC also adjusted the specification of java.awt.Toolkit and java.awt.Window so that they are specified to use the SecurityManager's checkPermission method directly, those obsoleting the 3 JDK 1.1-era checkXXX methods.
This new CCC proposes to degrade the 3 checkXXX further to allow us to finally eliminate the dependency on AWTPermission from the base/core module.
Solution
Change the checkTopLevelWindow, checkSystemClipboardAccess, checkAwtEventQueueAccess to specify that they check AllPermission.
Specification
See attached specdiff or the following summary of the new descriptions proposed for these methods:
checkTopLevelWindow:
Deprecated. This method was originally used to check if the calling thread was trusted to bring up a top-level window. The method has been obsoleted and code should instead use checkPermission(java.security.Permission) to check AWTPermission("showWindowWithoutWarningBanner").
checkSystemClipboardAccess:
Deprecated. This method was originally used to check if the calling thread could access the system clipboard. The method has been obsoleted and code should instead use checkPermission(java.security.Permission) to check AWTPermission("accessClipboard").
checkAwtEventQueueAccess:
Deprecated. This method was originally used to check if the calling thread could access the AWT event queue. The method has been obsoleted and code should instead use checkPermission(java.security.Permission) to check AWTPermission("accessEventQueue").
- csr for
-
JDK-8029886 Change SecurityManager checkTopLevelWindow, checkSystemClipboard, checkAccessAwtEventQueueAccess to check AllPermission
- Closed