commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1102197 - in /commons/sandbox/digester3/trunk/src: examples/api/addressbook/ examples/api/dbinsert/ examples/api/document-markup/ examples/plugins/pipeline/ examples/xmlrules/addressbook/ main/java/org/apache/commons/digester3/ main/java/o...
Date Thu, 12 May 2011 08:07:45 GMT
Author: simonetripodi
Date: Thu May 12 08:07:43 2011
New Revision: 1102197

URL: http://svn.apache.org/viewvc?rev=1102197&view=rev
Log:
since Digester is not thread safe, better switching from StringBuffer to StringBuilder that's
faster

Modified:
    commons/sandbox/digester3/trunk/src/examples/api/addressbook/Address.java
    commons/sandbox/digester3/trunk/src/examples/api/dbinsert/RowInserterRule.java
    commons/sandbox/digester3/trunk/src/examples/api/document-markup/MarkupDigester.java
    commons/sandbox/digester3/trunk/src/examples/plugins/pipeline/SubstituteTransform.java
    commons/sandbox/digester3/trunk/src/examples/xmlrules/addressbook/Address.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallParamRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/NodeCreateRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectCreateRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectParamRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/PathCallParamRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNextRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertyRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetRootRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetTopRule.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/DigesterRuleParser.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Address.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Box.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Employee.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/ObjectParamRuleTestCase.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/OverlappingCallMethodRuleTestCase.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/SimpleTestBean.java
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/plugins/TestXmlRuleInfo.java

Modified: commons/sandbox/digester3/trunk/src/examples/api/addressbook/Address.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/api/addressbook/Address.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/api/addressbook/Address.java (original)
+++ commons/sandbox/digester3/trunk/src/examples/api/addressbook/Address.java Thu May 12 08:07:43
2011
@@ -30,7 +30,7 @@ public class Address {
     private String country;
 
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append( " address (type "+ type + ")\n");
         sb.append( "       " + street + "\n");
         sb.append( "       " + city + " " + state + " " + zip + "\n");
@@ -39,7 +39,7 @@ public class Address {
     }
 
     public void print(java.io.PrintStream out, int indentAmount) {
-        StringBuffer indentStr = new StringBuffer(indentAmount);
+        StringBuilder indentStr = new StringBuilder(indentAmount);
         for(; indentAmount > 0; --indentAmount) {
             indentStr.append(' ');
         }

Modified: commons/sandbox/digester3/trunk/src/examples/api/dbinsert/RowInserterRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/api/dbinsert/RowInserterRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/api/dbinsert/RowInserterRule.java (original)
+++ commons/sandbox/digester3/trunk/src/examples/api/dbinsert/RowInserterRule.java Thu May
12 08:07:43 2011
@@ -65,8 +65,8 @@ public class RowInserterRule extends org
         // PreparedStatement.getParameterMetaData method to retrieve
         // retrieve parameter types, etc.
         
-        StringBuffer colnames = new StringBuffer();
-        StringBuffer colvalues = new StringBuffer();
+        StringBuilder colnames = new StringBuilder();
+        StringBuilder colvalues = new StringBuilder();
         
         for(Iterator i = row.getColumns().iterator(); i.hasNext();)
         {
@@ -87,7 +87,7 @@ public class RowInserterRule extends org
             colvalues.append("'");
         }
 
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("insert into ");
         buf.append(table.getName());
         buf.append(" (");

Modified: commons/sandbox/digester3/trunk/src/examples/api/document-markup/MarkupDigester.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/api/document-markup/MarkupDigester.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/api/document-markup/MarkupDigester.java (original)
+++ commons/sandbox/digester3/trunk/src/examples/api/document-markup/MarkupDigester.java Thu
May 12 08:07:43 2011
@@ -54,7 +54,7 @@ public class MarkupDigester extends Dige
     /**
      * The text found in the current element since the last child element.
      */
-    protected StringBuffer currTextSegment = new StringBuffer();
+    protected StringBuilder currTextSegment = new StringBuilder();
 
     /**
      * Process notification of character data received from the body of

Modified: commons/sandbox/digester3/trunk/src/examples/plugins/pipeline/SubstituteTransform.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/plugins/pipeline/SubstituteTransform.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/plugins/pipeline/SubstituteTransform.java
(original)
+++ commons/sandbox/digester3/trunk/src/examples/plugins/pipeline/SubstituteTransform.java
Thu May 12 08:07:43 2011
@@ -41,13 +41,13 @@ public class SubstituteTransform impleme
     }
     
     public String transform(String s) {
-        StringBuffer buf = new StringBuffer(s);
+        StringBuilder buf = new StringBuilder(s);
         while (true) {
             int idx = buf.indexOf(from);
             if (idx == -1)
                 break;
             
-            StringBuffer buf2 = buf.replace(idx, idx+from.length(), to);
+            StringBuilder buf2 = buf.replace(idx, idx+from.length(), to);
         }
         return buf.toString();
     }

Modified: commons/sandbox/digester3/trunk/src/examples/xmlrules/addressbook/Address.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/xmlrules/addressbook/Address.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/xmlrules/addressbook/Address.java (original)
+++ commons/sandbox/digester3/trunk/src/examples/xmlrules/addressbook/Address.java Thu May
12 08:07:43 2011
@@ -30,7 +30,7 @@ public class Address {
     private String country;
 
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append( " address (type "+ type + ")\n");
         sb.append( "       " + street + "\n");
         sb.append( "       " + city + " " + state + " " + zip + "\n");
@@ -39,7 +39,7 @@ public class Address {
     }
 
     public void print(java.io.PrintStream out, int indentAmount) {
-        StringBuffer indentStr = new StringBuffer(indentAmount);
+        StringBuilder indentStr = new StringBuilder(indentAmount);
         for(; indentAmount > 0; --indentAmount) {
             indentStr.append(' ');
         }

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/BeanPropertySetterRule.java
Thu May 12 08:07:43 2011
@@ -186,7 +186,7 @@ public class BeanPropertySetterRule exte
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("BeanPropertySetterRule[");
+        StringBuilder sb = new StringBuilder("BeanPropertySetterRule[");
         sb.append("propertyName=");
         sb.append(propertyName);
         sb.append("]");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java
Thu May 12 08:07:43 2011
@@ -511,7 +511,7 @@ public class CallMethodRule extends Rule
         }
         
         if (target == null) {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append("[CallMethodRule]{");
             sb.append(getDigester().getMatch());
             sb.append("} Call target is null (");
@@ -525,7 +525,7 @@ public class CallMethodRule extends Rule
         
         // Invoke the required method on the top object
         if (getDigester().getLogger().isDebugEnabled()) {
-            StringBuffer sb = new StringBuffer("[CallMethodRule]{");
+            StringBuilder sb = new StringBuilder("[CallMethodRule]{");
             sb.append(getDigester().getMatch());
             sb.append("} Call ");
             sb.append(target.getClass().getName());
@@ -594,7 +594,7 @@ public class CallMethodRule extends Rule
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("CallMethodRule[");
+        StringBuilder sb = new StringBuilder("CallMethodRule[");
         sb.append("methodName=");
         sb.append(methodName);
         sb.append(", paramCount=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallParamRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallParamRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallParamRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/CallParamRule.java
Thu May 12 08:07:43 2011
@@ -164,7 +164,7 @@ public class CallParamRule extends Rule 
             
             if (getDigester().getLogger().isDebugEnabled()) {
             
-                StringBuffer sb = new StringBuffer("[CallParamRule]{");
+                StringBuilder sb = new StringBuilder("[CallParamRule]{");
                 sb.append(getDigester().getMatch());
                 sb.append("} Save from stack; from stack?").append(fromStack);
                 sb.append("; object=").append(param);
@@ -223,7 +223,7 @@ public class CallParamRule extends Rule 
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("CallParamRule[");
+        StringBuilder sb = new StringBuilder("CallParamRule[");
         sb.append("paramIndex=");
         sb.append(paramIndex);
         sb.append(", attributeName=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Thu May 12 08:07:43 2011
@@ -1365,7 +1365,7 @@ public class Digester extends DefaultHan
         }
 
         // Compute the current matching rule
-        StringBuffer sb = new StringBuffer(match);
+        StringBuilder sb = new StringBuilder(match);
         if (match.length() > 0) {
             sb.append('/');
         }

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
Thu May 12 08:07:43 2011
@@ -354,7 +354,7 @@ public class FactoryCreateRule extends R
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("FactoryCreateRule[");
+        StringBuilder sb = new StringBuilder("FactoryCreateRule[");
         sb.append("className=");
         sb.append(className);
         sb.append(", attributeName=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/NodeCreateRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/NodeCreateRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/NodeCreateRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/NodeCreateRule.java
Thu May 12 08:07:43 2011
@@ -153,7 +153,7 @@ public class NodeCreateRule extends Rule
         /**
          * The text content of the current top DOM node.
          */
-        protected StringBuffer topText = new StringBuffer();
+        protected StringBuilder topText = new StringBuilder();
 
 
         // --------------------------------------------- Helper Methods

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectCreateRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectCreateRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectCreateRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectCreateRule.java
Thu May 12 08:07:43 2011
@@ -158,7 +158,7 @@ public class ObjectCreateRule extends Ru
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("ObjectCreateRule[");
+        StringBuilder sb = new StringBuilder("ObjectCreateRule[");
         sb.append("className=");
         sb.append(className);
         sb.append(", attributeName=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectParamRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectParamRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectParamRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/ObjectParamRule.java
Thu May 12 08:07:43 2011
@@ -116,7 +116,7 @@ public class ObjectParamRule extends Rul
      */
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer("ObjectParamRule[");
+        StringBuilder sb = new StringBuilder("ObjectParamRule[");
         sb.append("paramIndex=");
         sb.append(paramIndex);
         sb.append(", attributeName=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/PathCallParamRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/PathCallParamRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/PathCallParamRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/PathCallParamRule.java
Thu May 12 08:07:43 2011
@@ -86,7 +86,7 @@ public class PathCallParamRule extends R
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("PathCallParamRule[");
+        StringBuilder sb = new StringBuilder("PathCallParamRule[");
         sb.append("paramIndex=");
         sb.append(paramIndex);
         sb.append("]");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNestedPropertiesRule.java
Thu May 12 08:07:43 2011
@@ -283,7 +283,7 @@ public class SetNestedPropertiesRule ext
      */
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer("SetNestedPropertiesRule[");
+        StringBuilder sb = new StringBuilder("SetNestedPropertiesRule[");
         sb.append("allowUnknownChildElements=");
         sb.append(allowUnknownChildElements);
         sb.append(", trimData=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNextRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNextRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNextRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetNextRule.java
Thu May 12 08:07:43 2011
@@ -189,7 +189,7 @@ public class SetNextRule extends Rule {
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("SetNextRule[");
+        StringBuilder sb = new StringBuilder("SetNextRule[");
         sb.append("methodName=");
         sb.append(methodName);
         sb.append(", paramType=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertiesRule.java
Thu May 12 08:07:43 2011
@@ -282,7 +282,7 @@ public class SetPropertiesRule extends R
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("SetPropertiesRule[");
+        StringBuilder sb = new StringBuilder("SetPropertiesRule[");
         sb.append("]");
         return (sb.toString());
 

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertyRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertyRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertyRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetPropertyRule.java
Thu May 12 08:07:43 2011
@@ -147,7 +147,7 @@ public class SetPropertyRule extends Rul
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("SetPropertyRule[");
+        StringBuilder sb = new StringBuilder("SetPropertyRule[");
         sb.append("name=");
         sb.append(name);
         sb.append(", value=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetRootRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetRootRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetRootRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetRootRule.java
Thu May 12 08:07:43 2011
@@ -182,7 +182,7 @@ public class SetRootRule extends Rule {
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("SetRootRule[");
+        StringBuilder sb = new StringBuilder("SetRootRule[");
         sb.append("methodName=");
         sb.append(methodName);
         sb.append(", paramType=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetTopRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetTopRule.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetTopRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/SetTopRule.java
Thu May 12 08:07:43 2011
@@ -181,7 +181,7 @@ public class SetTopRule extends Rule {
     @Override
     public String toString() {
 
-        StringBuffer sb = new StringBuffer("SetTopRule[");
+        StringBuilder sb = new StringBuilder("SetTopRule[");
         sb.append("methodName=");
         sb.append(methodName);
         sb.append(", paramType=");

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/DigesterRuleParser.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/DigesterRuleParser.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/DigesterRuleParser.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/xmlrules/DigesterRuleParser.java
Thu May 12 08:07:43 2011
@@ -89,7 +89,7 @@ public class DigesterRuleParser extends 
 
         @Override
         public String toString() {
-            StringBuffer str = new StringBuffer();
+            StringBuilder str = new StringBuilder();
             for (int i = 0; i < size(); i++) {
                 String elem = get(i).toString();
                 if (elem.length() > 0) {
@@ -453,7 +453,7 @@ public class DigesterRuleParser extends 
          * by concatenating the pattern prefix with the given pattern.
          */
         public void add(String pattern, Rule rule) {
-            StringBuffer buffer = new StringBuffer();
+            StringBuilder buffer = new StringBuilder();
             buffer.append(prefix);
             if (!pattern.startsWith("/")) {
                 buffer.append('/'); 

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Address.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Address.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Address.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Address.java
Thu May 12 08:07:43 2011
@@ -94,7 +94,7 @@ public class Address {
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer("Address[");
+        StringBuilder sb = new StringBuilder("Address[");
         sb.append("street=");
         sb.append(street);
         sb.append(", city=");

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Box.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Box.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Box.java (original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Box.java Thu
May 12 08:07:43 2011
@@ -51,7 +51,7 @@ public class Box {
     @Override
     public String toString()
     {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("[Box] id=");
         buf.append(id);
         buf.append(" nchildren=");
@@ -70,7 +70,7 @@ public class Box {
      * sequence. Each name is separated by a space from the preceding one.
      */
     public String getIds() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(this.id);
         for(Box child : children) {
             buf.append(" ");

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/CallMethodRuleTestCase.java
Thu May 12 08:07:43 2011
@@ -205,7 +205,7 @@ public class CallMethodRuleTestCase {
     @Test
     public void testParamsFromStack() throws SAXException, IOException {
 
-        StringBuffer xml = new StringBuffer().
+        StringBuilder xml = new StringBuilder().
             append("<?xml version='1.0'?>").
             append("<map>").
             append("  <key name='The key'/>").
@@ -290,7 +290,7 @@ public class CallMethodRuleTestCase {
     public void testOrderNestedPartB() throws Exception {
         
         // Configure the digester as required
-        StringBuffer word = new StringBuffer();
+        StringBuilder word = new StringBuilder();
         digester.push(word);
         digester.addCallMethod("*/element", "append", 1);
         digester.addCallParam("*/element", 0, "name");

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Employee.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Employee.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Employee.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/Employee.java
Thu May 12 08:07:43 2011
@@ -113,7 +113,7 @@ public class Employee {
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer("Employee[");
+        StringBuilder sb = new StringBuilder("Employee[");
         sb.append("firstName=");
         sb.append(firstName);
         sb.append(", lastName=");

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/LocationTrackerTestCase.java
Thu May 12 08:07:43 2011
@@ -51,7 +51,7 @@ public class LocationTrackerTestCase {
                 // note that a Locator object can also provide 
                 // publicId and systemId info.
                 Locator l = d.getDocumentLocator();
-                StringBuffer locn = new StringBuffer();
+                StringBuilder locn = new StringBuilder();
                 locn.append("line=");
                 locn.append(l.getLineNumber());
                 locations.put(o, locn.toString());

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/ObjectParamRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/ObjectParamRuleTestCase.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/ObjectParamRuleTestCase.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/ObjectParamRuleTestCase.java
Thu May 12 08:07:43 2011
@@ -81,7 +81,7 @@ public class ObjectParamRuleTestCase {
 
     // ------------------------------------------------ Individual Test Methods
 
-    private StringBuffer sb = new StringBuffer().
+    private StringBuilder sb = new StringBuilder().
         append("<arraylist><A/><B/><C/><D desc=\"the fourth\"/><E/></arraylist>");
 
 

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/OverlappingCallMethodRuleTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/OverlappingCallMethodRuleTestCase.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/OverlappingCallMethodRuleTestCase.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/OverlappingCallMethodRuleTestCase.java
Thu May 12 08:07:43 2011
@@ -48,7 +48,7 @@ public class OverlappingCallMethodRuleTe
 
     @Test
     public void testItem1() throws SAXException, IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <item id='1'>anitem</item>");
         input.append("</root>");
@@ -71,7 +71,7 @@ public class OverlappingCallMethodRuleTe
 
     @Test
     public void testItem2() throws SAXException, IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <item id='1'>anitem</item>");
         input.append("</root>");
@@ -94,7 +94,7 @@ public class OverlappingCallMethodRuleTe
 
     @Test
     public void testItem3() throws SAXException, IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <item>1</item>");
         input.append("</root>");
@@ -138,7 +138,7 @@ public class OverlappingCallMethodRuleTe
      */
     @Test
     public void testItem4() throws SAXException, IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <item>");
         input.append("  <id value='1'/>");
@@ -175,7 +175,7 @@ public class OverlappingCallMethodRuleTe
      */
     @Test
     public void testWildcard1() throws SAXException, IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<box id='A1'>");
         input.append(" <box id='B1'>");
         input.append("  <box id='C1'/>");
@@ -208,7 +208,7 @@ public class OverlappingCallMethodRuleTe
      */
     @Test
     public void testWildcard2() throws SAXException, IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<box>A1");
         input.append(" <box>B1");
         input.append("  <box>C1</box>");

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/SimpleTestBean.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/SimpleTestBean.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/SimpleTestBean.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/SimpleTestBean.java
Thu May 12 08:07:43 2011
@@ -72,7 +72,7 @@ public class SimpleTestBean {
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer("[SimpleTestBean]");
+        StringBuilder sb = new StringBuilder("[SimpleTestBean]");
         sb.append(" alpha=");
         sb.append(alpha);
         sb.append(" beta=");

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/plugins/TestXmlRuleInfo.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/plugins/TestXmlRuleInfo.java?rev=1102197&r1=1102196&r2=1102197&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/plugins/TestXmlRuleInfo.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/plugins/TestXmlRuleInfo.java
Thu May 12 08:07:43 2011
@@ -43,7 +43,7 @@ public class TestXmlRuleInfo {
         //   separate class by explicitly declaring a file containing
         //   the rules, using a relative or absolute path name.
         
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <plugin");
         input.append("  id='testobject'"); 
@@ -83,7 +83,7 @@ public class TestXmlRuleInfo {
         //   and explicitly declaring a file which is somewhere in the 
         //   classpath.
 
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <plugin");
         input.append("  id='testobject'"); 
@@ -123,7 +123,7 @@ public class TestXmlRuleInfo {
         //   and explicitly declaring a file which is somewhere in the 
         //   classpath.
 
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         input.append("<root>");
         input.append(" <plugin");
         input.append("  id='testobject'"); 



Mime
View raw message