You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2007/01/15 12:13:27 UTC

[jira] Reopened: (HARMONY-2955) [classlib][luni]File.deleteOnExit should implement with doPrivileged?

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

Tony Wu reopened HARMONY-2955:
------------------------------

    Estimated Complexity: Unknown

> [classlib][luni]File.deleteOnExit should implement with doPrivileged?
> ---------------------------------------------------------------------
>
>                 Key: HARMONY-2955
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2955
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>
> As title, following testcase passes on RI whereas throws "AccessControlException:Access denied" on Harmony
>     public void test() throws IOException {
>         File dir = File.createTempFile("hytemp", "");
>         dir.deleteOnExit();
>         SecurityManager backup = System.getSecurityManager();
>         try {
>             System.setSecurityManager(new MySecurityManager());
>         } finally {
>             System.setSecurityManager(backup);
>         }
>     }
>     class MySecurityManager extends SecurityManager {
>         public void checkPermission(Permission perm) {
>             if ("setSecurityManager".equals(perm.getName())) {
>                 return;
>             }
>             super.checkPermission(perm);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira