incubator-kalumet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1203246 - /incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/utils/StackTraceUtils.java
Date Thu, 17 Nov 2011 16:29:43 GMT
Author: jbonofre
Date: Thu Nov 17 16:29:42 2011
New Revision: 1203246

URL: http://svn.apache.org/viewvc?rev=1203246&view=rev
Log:
Improve the stack trace utils method to use a StringBuilder

Modified:
    incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/utils/StackTraceUtils.java

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/utils/StackTraceUtils.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/utils/StackTraceUtils.java?rev=1203246&r1=1203245&r2=1203246&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/utils/StackTraceUtils.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/utils/StackTraceUtils.java
Thu Nov 17 16:29:42 2011
@@ -31,11 +31,13 @@ public class StackTraceUtils {
      * @return the string representation of the stack trace.
      */
     public static String toString(StackTraceElement[] elements) {
-        String trace = "";
+        StringBuilder builder = new StringBuilder();
         for (int i = 0; i < elements.length; i++) {
-            trace += elements[i].toString() + "\n";
+
+            builder.append(elements[i].toString());
+            builder.append('\n');
         }
-        return trace;
+        return builder.toString();
     }
 
 }



Mime
View raw message