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

Deprecate FXPermission for removal

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • jfx24
    • javafx
    • None
    • source
    • minimal
    • No change in behavior other than a deprecation removal warning at compile time.
    • Java API
    • JDK

      Summary

      Deprecate the FXPermission class for removal. After the removal of support for the Java Security Manager from JavaFX, this class serves no purpose. We intend to remove this class in JavaFX 26.

      Problem

      As of JavaFX 24, we no longer support running JavaFX applications with the Java Security Manager. Further, as of JDK 24, the Security Manager has been permanently disabled in the JDK itself and cannot be enabled. The FXPermission class no longer does anything useful and includes this API Note:

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

      Solution

      Deprecate the FXPermission class for removal with the intention to remove it in JavaFX 26.

      Specification

      --- a/modules/javafx.base/src/main/java/javafx/util/FXPermission.java
      +++ b/modules/javafx.base/src/main/java/javafx/util/FXPermission.java
      @@ -43,7 +43,12 @@ import java.security.BasicPermission;
        * @see java.security.PermissionCollection
        *
        * @since 9
      + *
      + * @deprecated This class was only useful in connection with the
      + *       Security Manager, which is no longer supported.
      + *       There is no replacement for this class.
        */
      +@Deprecated(since = "24", forRemoval = true)
       public final class FXPermission extends BasicPermission {

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Ambarish Rapte, Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: