harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "deven you (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-6093) [classlib][luni] Remove double security check in java.io.File
Date Tue, 06 Jul 2010 09:26:49 GMT

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

deven you closed HARMONY-6093.
------------------------------


This jira has been verified, Thanks!

> [classlib][luni] Remove double security check in java.io.File
> -------------------------------------------------------------
>
>                 Key: HARMONY-6093
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6093
>             Project: Harmony
>          Issue Type: Bug
>    Affects Versions: 5.0M8
>            Reporter: deven you
>            Assignee: Regis Xu
>             Fix For: 5.0M10
>
>         Attachments: File.diff
>
>
> there is a double security check in java.io.File.canRead():
>    public boolean canRead() {
>         SecurityManager security = System.getSecurityManager();
>         if (security != null) {
>             security.checkRead(path);
>         }
>         return exists() && !isWriteOnlyImpl(properPath(true));
>     }
> in exists(), it already do the security check:
>    public boolean exists() {
>         if (path.length() == 0) {
>             return false;
>         }
>         SecurityManager security = System.getSecurityManager();
>         if (security != null) {
>             security.checkRead(path);
>         }
>         return existsImpl(properPath(true));
>     }

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