harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-6126) [classlib][luni] - remove unnecessary code in java.io.File
Date Tue, 14 Apr 2009 06:49:15 GMT

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

Regis Xu closed HARMONY-6126.
-----------------------------


> [classlib][luni] - remove unnecessary code in java.io.File
> ----------------------------------------------------------
>
>                 Key: HARMONY-6126
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6126
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Regis Xu
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6126.diff
>
>
> two places:
> 1. in fixSlashes:
> <code>
>         String tempPath = new String(newPath, 0, newLength);
>         // If it's the same keep it identical for SecurityManager purposes
>         if (!tempPath.equals(origPath)) {
>             return tempPath;
>         }
>         return origPath; 
> </code>
> could be simplified:
> <code>
>     return new String(newPath, 0, newLength); 
> </code>
> 2. in properPath:
> <code>
>         if ((properPath = properPathImpl(pathBytes)) != null) {
>             return properPath;
>         }
> </code>
> on Linux, properPathImpl just return null; on Windows,  it will return not null only
when the path is absolute, 
> but before above code segment, there is code:
> <code>
>         if (isAbsoluteImpl(pathBytes)) {
>             return properPath = pathBytes;
>         }
> </code>
> so properPathImpl always return null, can be safely removed.

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