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

Deprecate core library permission classes for removal

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 25
    • core-libs
    • None
    • source
    • minimal
    • Hide
      Compiling source files that use the deprecated classes will generate warnings.
      There is no change in the behavior of the classes.
      Show
      Compiling source files that use the deprecated classes will generate warnings. There is no change in the behavior of the classes.
    • Java API
    • SE

      Summary

      Permission classes used by the now removed Security Manager are deprecated for removal including FilePermission, LinkPermission, LoggingPermission, PropertyPermission, ReflectPermission, RuntimePermission, and SerializablePermission.

      Problem

      Now that JEP 486 has been integrated and the Security Manager is permanently disabled, the following permission classes in the core libraries are no longer useful: FilePermission, LinkPermission, LoggingPermission, PropertyPermission, ReflectPermission, RuntimePermission, SerializablePermission.

      Solution

      The classes and methods should be deprecated for removal to generate warnings for any use of the classes in libraries or applications.

      Specification

      For the classes FilePermission, LinkPermission, LoggingPermission, PropertyPermission, ReflectPermission, RuntimePermission, and SerializablePermission, each class adds the annotation indicating the deprecation for removal.

      @Deprecated(since="25", orRemoval = true)

      The '@apiNote' in each class is changed to '@deprecated' so that the javadoc for each class includes the text:

      Deprecated, for removal: This API element is subject to removal in a future version.

      The existing text describing the deprecation is retained:

      This permission cannot be used for controlling access to resources as the Security Manager is no longer supported.

            rriggs Roger Riggs
            mullan Sean Mullan
            Sean Mullan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: