harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Deakin (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-1226) Files can't be read with security manager installed
Date Thu, 18 Jun 2009 15:03:07 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Deakin closed HARMONY-1226.
----------------------------------


Test passes for me on latest code - closing.

> Files can't be read with security manager installed
> ---------------------------------------------------
>
>                 Key: HARMONY-1226
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1226
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib
>         Environment: Windows XP Professional 
>            Reporter: Anton Luht
>
> This bug was found during investigating of mx4j JUnit test failure
> Files can't be read after security manager is installed.
> Harmony + DRLVM Version:
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r432532, (Aug 18 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> Code to reproduce:
> public class Test  { 
>     public static void main (String[] args) throws Exception {
>     	System.setSecurityManager(new SecurityManager() {});
>         System.out.println(new java.io.File("Test.class").exists());
>     }
> }
> Output in RI:
> true
> Output in DRLVM+Harmony:
> java.security.AccessControlException: Permission check failed (java.io.FilePermi
> ssion Test.class read)
>         at java.security.AccessControlContext.checkPermission()
>         at java.security.AccessController.checkPermission()
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:737)
>         at java.lang.SecurityManager.checkRead(SecurityManager.java:397)
>         at java.io.File.exists(File.java:435)
>         at Test.main(Test.java:4)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message