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

(spec) FilePermission constructor missing spec for null and empty String params

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b57
    • CPU:
      generic
    • OS:
      generic

      Description

      Name: smR10189 Date: 11/18/2003



      To create FilePermission object two parameters are passed to the constructor.
      The first parameter is a path to a file or directory. The second parameter
      is a list of requested actions. The spec shows how to specify a path for
      directory using special tokens and also it enumerates "possible actions".

      But the spec doesn't define an implementation behavior if:
      - the first parameter is null or empty string.
      - second parameter is null or empty string.
      - a list of requested actions contains actions that differ from
        "possible actions" described by the spec.

      See, API spec for java.io.FilePermission constructor below:

        public FilePermission(String path, String actions)
          Creates a new FilePermission object with the specified actions. path is the
          pathname of a file or directory, and actions contains a comma-separated
          list of the desired actions granted on the file or directory. Possible
          actions are "read", "write", "execute", and "delete".

          A pathname that ends in "/*" (where "/" is the file separator character,
          File.separatorChar) indicates a directory and all the files contained in
          that directory. A pathname that ends with "/-" indicates a directory and
          (recursively) all files and subdirectories contained in that directory.
          The special pathname "<<ALL FILES>>" matches all files.

          A pathname consisting of a single "*" indicates all the files in the
          current directory, while a pathname consisting of a single "-" indicates
          all the files in the current directory and (recursively) all files and
          subdirectories contained in the current directory.

        Parameters:
          path - the pathname of the file/directory.
          actions - the action string.

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            jhangalsunw Jayalaxmi Hangal (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: