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:09:50 UTC
[jira] Created: (HARMONY-6126) [classlib][luni] - remove
unnecessary code in java.io.File
[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
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.
[jira] Resolved: (HARMONY-6126) [classlib][luni] - remove
unnecessary code in java.io.File
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Regis Xu resolved HARMONY-6126.
-------------------------------
Resolution: Fixed
Fix Version/s: 5.0M9
committed to svn repository at r764686
> [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.
[jira] Updated: (HARMONY-6126) [classlib][luni] - remove
unnecessary code in java.io.File
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison updated HARMONY-6126:
---------------------------------
Fix Version/s: (was: 5.0M9)
5.0M10
> [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.0M10
>
> 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.
[jira] Closed: (HARMONY-6126) [classlib][luni] - remove unnecessary
code in java.io.File
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (HARMONY-6126) [classlib][luni] - remove
unnecessary code in java.io.File
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ 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.