harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2955) [classlib][luni]File.deleteOnExit should implement with doPrivileged?
Date Mon, 15 Jan 2007 11:13:28 GMT

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

Tony Wu closed HARMONY-2955.
----------------------------

    Resolution: Won't Fix

> [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

        

Mime
View raw message