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

Remove pathname canonicalization from FilePermission

    Details

    • Subcomponent:
    • Resolved In Build:
      b140

      Description

      Remove the pathname canonicalization process in FilePermission, so that only the original pathname argument is used in the implies, equals and hashCode methods. This should significantly improve the performance and fix some old bugs (See Issue Links).

      The compatibility impact of this change will be high, because implies() relation between 2 FilePermissions will change, especially if one is on a relative path and the other on an absolute path, or one on a symlink and the other on a target. A FilePermission could be granted in several ways:

      - By a policy. For example, a policy file.

      - Automatically by a class loader. For example, the FilePermission doc asserts that "Code can always read a file from the same directory it's in (or a subdirectory of that directory); it does not need explicit permission to do so". One can see this behavior implemented in the getPermissions() methods of various ClassLoader implementations, currently including URLClassLoader, BuiltinClassLoader and Loader.

      - By a doPrivileged-with-permissions call.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                weijun Weijun Wang
                Reporter:
                weijun Weijun Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: