Description
Executing file.canExecute with a security policy that grants the file execute permission throws a security exception that the file does not have read permission:
java.security.AccessControlException: Access denied (java.io.FilePermission /tmp/harmony-test-FileTest/executeFile read)
at java.security.AccessController.checkPermission(AccessController.java:95)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:862)
at java.lang.SecurityManager.checkRead(SecurityManager.java:480)
at java.io.File.exists(File.java:446)
at java.io.File.canExecute(File.java:1702)
According to the spec, a security exception should be thrown only when SecurityManager.checkExec denies access.