Summary
-------
The class java.awt.AWTPermission is obsolete as the SecurityManager is now permanently disabled by JEP 486 so it is deprecated for removal
Problem
-------
The permissions specified for java.awt.AWTPermission are all removed already, but the class still exists with no deprecation.
In addition the AWT Modality spec has a reference to AWTPermissions which should have been removed already by JEP 486 but was overlooked and it should be removed now.
Solution
--------
Deprecate for removal java.awt.AWTPermission, and delete Permission references in the Modality spec.
Specification
-------------
java/awt/AWTPermissions.java
<pre>
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
+ * Consequently this class is deprecated for removal in a future release.
*
* @see java.security.BasicPermission
* @see java.security.Permission
* @see java.security.Permissions
* @see java.security.PermissionCollection
@@ -44,11 +45,13 @@
* @see java.security.PermissionCollection
* @see java.lang.SecurityManager
*
* @author Marianne Mueller
* @author Roland Schemers
+ * @deprecated There is no replacement for this class.
*/
+@Deprecated(since="24", forRemoval=true)
public final class AWTPermission extends BasicPermission {
</pre>
java/awt/doc-files/Modality.html
<pre>
- <a id="Security"></a>
- <h2>Security</h2>
-
- <p>
- A special <code>AWTPermission</code>, <code>"toolkitModality"</code>,
- is required to show toolkit-modal
- dialogs. This would prevent, for example, blocking a browser or
- Java Web Start (JWS) by modal dialogs shown from applets.
- </p><p>
- The same permission is required to exclude a window from toolkit modality.
- This would prevent, for example, a dialog shown from an applet not to be
- blocked by a browser's or JWS's modal dialog.
</pre>