harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r921757 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
Date Thu, 11 Mar 2010 09:40:50 GMT
Author: regisxu
Date: Thu Mar 11 09:40:49 2010
New Revision: 921757

URL: http://svn.apache.org/viewvc?rev=921757&view=rev
Log:
Apply patch for HARMONY-6467: [classlib][luni]Using StringBuilder.append instead of String
plus in while loop in the InetAddress

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java?rev=921757&r1=921756&r2=921757&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java Thu
Mar 11 09:40:49 2010
@@ -1255,10 +1255,11 @@ public class InetAddress extends Object 
                     }
 
                     // the rest should be the scope string
-                    scopeString = tokenizer.nextToken();
+                    StringBuilder buf = new StringBuilder();
                     while (tokenizer.hasMoreTokens()) {
-                        scopeString = scopeString + tokenizer.nextToken();
+                        buf.append(tokenizer.nextToken());
                     }
+                    scopeString = buf.toString();
                 }
             }
 



Mime
View raw message