From cf5ee0bda2e50d91673ff6bfa2d6d1dbb96fa99b Mon Sep 17 00:00:00 2001 From: Phil Race Date: Wed, 27 Nov 2024 22:10:25 +0000 Subject: [PATCH] 8342280: Deprecate for removal java.awt.AWTPermission Reviewed-by: azvegint, kizune --- .../share/classes/java/awt/AWTPermission.java | 3 +++ .../classes/java/awt/doc-files/Modality.html | 17 +---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/java.desktop/share/classes/java/awt/AWTPermission.java b/src/java.desktop/share/classes/java/awt/AWTPermission.java index 53a5ebfa204..87ef53d1481 100644 --- a/src/java.desktop/share/classes/java/awt/AWTPermission.java +++ b/src/java.desktop/share/classes/java/awt/AWTPermission.java @@ -37,6 +37,7 @@ import java.security.BasicPermission; * @apiNote * 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 @@ -46,7 +47,9 @@ import java.security.BasicPermission; * * @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 { /** diff --git a/src/java.desktop/share/classes/java/awt/doc-files/Modality.html b/src/java.desktop/share/classes/java/awt/doc-files/Modality.html index 88f9911cbc3..c9aa3e146a3 100644 --- a/src/java.desktop/share/classes/java/awt/doc-files/Modality.html +++ b/src/java.desktop/share/classes/java/awt/doc-files/Modality.html @@ -46,7 +46,6 @@
  • Show/hide blocking
  • Modal exclusion
  • Related AWT features
  • -
  • Security
  • Platform support
  • Compatibility
  • Examples
  • @@ -128,7 +127,6 @@ so a toolkit-modal dialog shown from an applet may affect other applets and all windows of the browser instance which embeds the Java runtime environment for this toolkit. - See the security section below.

    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 unchanged. - -

    Security

    - -

    - A special AWTPermission, "toolkitModality", - 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. -

    - 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. - -

    Platform support

    +

    Platform support

    Two java.awt.Toolkit methods allow you to check whether