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

Allow other named NetPermissions to be used

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P3
    • 13
    • core-libs
    • None
    • minimal
    • Java API
    • SE

    Description

      Summary

      Allow other named NetPermissions to be used.

      Problem

      The current specification of java.net.NetPermission states: "The following table lists all the possible NetPermission target names ...", which implies that unless the permission target is listed in the table, it cannot be used.

      However, there is no such enforcement in the implementation, and it is useful and somewhat common for applications / libraries to create their own permission target names.

      Solution

      Relax the specification so that non-listed permissions are allowable. The table will remain, but will only document Java SE permissions.

      Specification

      --- a/src/java.base/share/classes/java/net/NetPermission.java
      +++ b/src/java.base/share/classes/java/net/NetPermission.java
      @@ -43,7 +43,7 @@
        * signify a wildcard match. For example: "foo.*" and "*" signify a wildcard
        * match, while "*foo" and "a*b" do not.
        * <P>
      - * The following table lists all the possible NetPermission target names,
      + * The following table lists the standard NetPermission target names,
        * and for each provides a description of what the permission allows
        * and a discussion of the risks of granting code the permission.
        *

      Attachments

        Issue Links

          Activity

            People

              chegar Chris Hegarty
              chegar Chris Hegarty
              Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: