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/01/31 09:21:05 UTC

[jira] Resolved: (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 resolved HARMONY-3092.
------------------------------------

    Resolution: Fixed

Hello Ruth,

The patch has been applied at revision r501761, thank you for this enhancement. Please verify the issue is fixed as you expected. 

Best regards,
Richard

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