You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Richard Liang (JIRA)" <ji...@apache.org> on 2007/02/02 07:07:05 UTC
[jira] Closed: (HARMONY-3092) [classlib][luni] File.calculatePath()
generates unnecessary strings
[ https://issues.apache.org/jira/browse/HARMONY-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Liang closed HARMONY-3092.
----------------------------------
Verified by Ruth.
> [classlib][luni] File.calculatePath() generates unnecessary strings
> -------------------------------------------------------------------
>
> Key: HARMONY-3092
> URL: https://issues.apache.org/jira/browse/HARMONY-3092
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Reporter: Ruth Cao
> Assigned To: Richard Liang
> Attachments: Harmony-3092.diff
>
>
> Currently, java.io.File.calculatePath() has the following code:
> while (name.length() > 0 && (name.charAt(0) == separatorChar)) {
> name = name.substring(1, name.length());
> }
> It may generate a new string object every time in the loop and the only string will be used is the last one.
> I'll provide a patch and improve this soon. Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.