commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1198682 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java
Date Mon, 07 Nov 2011 09:50:54 GMT
Author: mcucchiara
Date: Mon Nov  7 09:50:53 2011
New Revision: 1198682

URL: http://svn.apache.org/viewvc?rev=1198682&view=rev
Log:
OGNL-38 - Use StringBuilder instead of StringBuffer.

Modified:
    commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java

Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java?rev=1198682&r1=1198681&r2=1198682&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java
(original)
+++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/MenuItem.java
Mon Nov  7 09:50:53 2011
@@ -63,11 +63,13 @@ public class MenuItem
 
     public String toString()
     {
-        StringBuffer sb = new StringBuffer( "MenuItem[" );
-        sb.append( "page=" + getPage() );
-        sb.append( ",label=" + getLabel() );
-        sb.append( ",children=" + getChildren().size() );
-        sb.append( "]" );
-        return sb.toString();
+        return new StringBuilder( "MenuItem[" )
+            .append( "page=" )
+            .append( getPage() )
+            .append( ",label=" )
+            .append( getLabel() )
+            .append( ",children=" )
+            .append( getChildren().size() )
+            .append( "]" ).toString();
     }
 }



Mime
View raw message