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

FilePermission.implies() works incorrectly on NT

XMLWordPrintable

      FilePermission.implies() returns false on NT in case
      object's pathname ends with "/-" and called with
      FilePermission's pathname contained in that directory.

      On Solaris machine FilePermission.implies() works fine.

      See Test.java :
      -------------------------------------------
      import java.io.FilePermission;

      public class Temp {
        public static void main(String[] argv) {
          FilePermission fp1 = new FilePermission("/tmp/bar", "write");
          FilePermission fp2 = new FilePermission("/tmp/-", "write");
          if(fp2.implies(fp1))
              System.out.println("implies() works correctly.");
            else {
              System.out.println("FAILED : implies() does not work correctly.");
            }
          System.exit(0);
        }
      }
      -------------------------------------------
      Output from the test (running on NT):
      FAILED : implies() does not work correctly.

            rschemersunw Roland Schemers (Inactive)
            asemidetsunw Alexei Semidetnov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: