openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r736330 - /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
Date Wed, 21 Jan 2009 16:29:26 GMT
Author: struberg
Date: Wed Jan 21 08:29:26 2009
New Revision: 736330

URL: http://svn.apache.org/viewvc?rev=736330&view=rev
Log:
OWB-57 use StringBuilder instead of string +=

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java?rev=736330&r1=736329&r2=736330&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
Wed Jan 21 08:29:26 2009
@@ -112,17 +112,19 @@
     public String toString()
     {
 
-        String string = "@" + annotationType().getName() + "(";
+        StringBuilder sb = new StringBuilder("@" + annotationType().getName() + "(");
         for (int i = 0; i < members.length; i++)
         {
-            string += members[i].getName() + "=";
-            string += this.invoke(members[i]);
+            sb.append(members[i].getName()).append("=");
+            sb.append(this.invoke(members[i]));
             if (i < members.length - 1)
             {
-                string += ",";
+                sb.append(",");
             }
         }
-        return string + ")";
+        
+        sb.append(")");
+        return sb.toString();
     }
 
     @Override



Mime
View raw message