harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth Cao (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3092) [classlib][luni] File.calculatePath() generates unnecessary strings
Date Wed, 31 Jan 2007 03:08:33 GMT
[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

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.

View raw message