Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8345003

Deprecate for removal java.awt.AWTPermission

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 24
    • client-libs
    • None
    • behavioral
    • minimal
    • Java API
    • SE

      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

        * 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 {
      
      

      java/awt/doc-files/Modality.html

      
      -    
      -    

      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.

            prr Philip Race
            prr Philip Race
            Alexander Zuev, Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: