-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
1.2.0
-
x86
-
windows_nt
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.
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.