You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Regis Xu (JIRA)" <ji...@apache.org> on 2009/03/24 08:11:50 UTC
[jira] Updated: (HARMONY-6126) [classlib][luni] - remove
unnecessary code in java.io.File
[ https://issues.apache.org/jira/browse/HARMONY-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Regis Xu updated HARMONY-6126:
------------------------------
Attachment: HARMONY-6126.diff
Would anyone help to try and review it?
> [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
> 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.