harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r405660 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
Date Wed, 10 May 2006 07:11:45 GMT
Author: smishura
Date: Wed May 10 00:11:43 2006
New Revision: 405660

URL: http://svn.apache.org/viewcvs?rev=405660&view=rev
Log:
Minor performance improvement.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java?rev=405660&r1=405659&r2=405660&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
Wed May 10 00:11:43 2006
@@ -2045,10 +2045,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 5);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2076,10 +2075,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 3);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2107,10 +2105,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 2);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2138,10 +2135,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 5);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2169,10 +2165,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 5);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2200,10 +2195,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 4);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2231,10 +2225,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 4);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2262,10 +2255,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 4);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');
@@ -2293,10 +2285,9 @@
             return "[]";
         StringBuilder sb = new StringBuilder(2 + array.length * 5);
         sb.append('[');
-        for (int i = 0; i < array.length; i++) {
-            if (i != 0) {
-                sb.append(", ");
-            }
+        sb.append(array[0]);
+        for (int i = 1; i < array.length; i++) {
+            sb.append(", ");
             sb.append(array[i]);
         }
         sb.append(']');



Mime
View raw message