8342280: Deprecate for removal java.awt.AWTPermission

Reviewed-by: azvegint, kizune
This commit is contained in:
Phil Race 2024-11-27 22:10:25 +00:00
parent 8ad0b2afe3
commit cf5ee0bda2
2 changed files with 4 additions and 16 deletions

View File

@ -37,6 +37,7 @@ import java.security.BasicPermission;
* @apiNote * @apiNote
* This permission cannot be used for controlling access to resources * This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported. * 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.BasicPermission
* @see java.security.Permission * @see java.security.Permission
@ -46,7 +47,9 @@ import java.security.BasicPermission;
* *
* @author Marianne Mueller * @author Marianne Mueller
* @author Roland Schemers * @author Roland Schemers
* @deprecated There is no replacement for this class.
*/ */
@Deprecated(since="24", forRemoval=true)
public final class AWTPermission extends BasicPermission { public final class AWTPermission extends BasicPermission {
/** /**

View File

@ -46,7 +46,6 @@
<li><a href="#ShowHideBlocking">Show/hide blocking</a></li> <li><a href="#ShowHideBlocking">Show/hide blocking</a></li>
<li><a href="#ModalExclusion">Modal exclusion</a></li> <li><a href="#ModalExclusion">Modal exclusion</a></li>
<li><a href="#Related">Related AWT features</a></li> <li><a href="#Related">Related AWT features</a></li>
<li><a href="#Security">Security</a></li>
<li><a href="#PlatformSupport">Platform support</a></li> <li><a href="#PlatformSupport">Platform support</a></li>
<li><a href="#Compatibility">Compatibility</a></li> <li><a href="#Compatibility">Compatibility</a></li>
<li><a href="#Examples">Examples</a></li> <li><a href="#Examples">Examples</a></li>
@ -128,7 +127,6 @@
so a toolkit-modal dialog shown from an applet may affect other so a toolkit-modal dialog shown from an applet may affect other
applets and all windows of the browser instance which embeds the applets and all windows of the browser instance which embeds the
Java runtime environment for this toolkit. Java runtime environment for this toolkit.
See the security section below.
</li></ol> </li></ol>
<p> <p>
Modality priority is arranged by the strength of blocking: modeless, Modality priority is arranged by the strength of blocking: modeless,
@ -331,21 +329,8 @@
If the modal dialog to be hidden does not have focus, the active window remains If the modal dialog to be hidden does not have focus, the active window remains
unchanged. unchanged.
<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.
<a id="PlatformSupport"></a> <a id="PlatformSupport"></a>
</p><h2>Platform support</h2> <h2>Platform support</h2>
<p> <p>
Two <code>java.awt.Toolkit</code> methods allow you to check whether Two <code>java.awt.Toolkit</code> methods allow you to check whether