JDK-8189621 : Mark deprecated javax.security.auth.Policy API with forRemoval=true
  • Type: CSR
  • Component: security-libs
  • Sub-Component: javax.security
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 10
  • Submitted: 2017-10-18
  • Updated: 2017-10-27
  • Resolved: 2017-10-26
Related Reports
CSR :  
Description
Summary
-------

Mark deprecated javax.security.auth.Policy API with forRemoval=true

Problem
-------

The `javax.security.auth.Policy` class has been deprecated since 1.4 and superseded/replaced by `java.security.Policy`. It is no longer necessary to retain this class and it should be removed in a future release.

Solution
--------

add forRemoval=true

Specification
-------------

    diff --git a/src/java.base/share/classes/javax/security/auth/Policy.java b/src/java.base/share/classes/javax/security/auth/Policy.java
    --- a/src/java.base/share/classes/javax/security/auth/Policy.java
    +++ b/src/java.base/share/classes/javax/security/auth/Policy.java
    @@ -152,11 +152,12 @@
      *
      * These two APIs provide callers the means to query the
      * Policy for Principal-based Permission entries.
    + * This class is subject to removal in a future version of Java SE.
      *
      * @since 1.4
      * @see java.security.Security security properties
      */
    -@Deprecated(since="1.4")
    +@Deprecated(since="1.4", forRemoval=true)
     public abstract class Policy {
 
         private static Policy policy;



Comments
I'll update the comment in my changeset. Thanks.
27-10-2017

With the inclusion of information about when the API was deprecated in the @Deprecated annotation, please update the @deprecated javadoc tag to not include that information: * @deprecated as of JDK version 1.4 -- Replaced by java.security.Policy. * java.security.Policy has a method: Moving to approved, subject to the edit above.
26-10-2017

The API was added forRemoval=true in JDK 9 but the change was backed out because GlassFish is still using it for compatibility. This member will be re-added in JDK 18.3.
18-10-2017