camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r933507 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/converter/jaxp/ camel-core/src/main/java/org/apache/camel/management/ camel-core/src/main/java/org/apache/camel/processo...
Date Tue, 13 Apr 2010 07:29:48 GMT
Author: davsclaus
Date: Tue Apr 13 07:29:47 2010
New Revision: 933507

URL: http://svn.apache.org/viewvc?rev=933507&view=rev
Log:
CAMEL-2632: Use StringBuilder instead of StringBuffer as its not a shared resource. Applied patch with thanks to Christian Mueller.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaValidationException.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/URISupport.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java
    camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/complex/onetomany/Order.java
    camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HMACAccumulator.java
    camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HexUtils.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBindingTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthEndpointTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/http/GHttpEndpointTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginBindingTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginEndpointTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/mail/GMailEndpointTest.java
    camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/task/GTaskEndpointTest.java
    camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7DataFormatTest.java
    camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java
    camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java
    camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java
    camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7ValidateTest.java
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsHammerTest.java
    camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpLineDelimiterUsingPlainSocketTest.java
    camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutUsingPlainSocketTest.java
    camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/ReverseProtocolHandler.java
    camel/trunk/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpConverters.java
    camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/UriCharactersEncoder.java
    camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/Delivery.java
    camel/trunk/examples/camel-example-gae/src/main/java/org/apache/camel/example/gae/ReportGenerator.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java Tue Apr 13 07:29:47 2010
@@ -971,7 +971,7 @@ public final class ExpressionBuilder {
     public static Expression concatExpression(final Collection<Expression> expressions, final String expression) {
         return new ExpressionAdapter() {
             public Object evaluate(Exchange exchange) {
-                StringBuffer buffer = new StringBuffer();
+                StringBuilder buffer = new StringBuilder();
                 for (Expression expression : expressions) {
                     String text = expression.evaluate(exchange, String.class);
                     if (text != null) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java Tue Apr 13 07:29:47 2010
@@ -37,14 +37,14 @@ public final class DomConverter {
 
     @Converter
     public static String toString(NodeList nodeList) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         append(buffer, nodeList);
         return buffer.toString();
     }
 
     @Converter
     public static Integer toInteger(NodeList nodeList) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         append(buffer, nodeList);
         String s = buffer.toString();
         return Integer.valueOf(s);
@@ -52,20 +52,20 @@ public final class DomConverter {
 
     @Converter
     public static Long toLong(NodeList nodeList) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         append(buffer, nodeList);
         String s = buffer.toString();
         return Long.valueOf(s);
     }
 
-    private static void append(StringBuffer buffer, NodeList nodeList) {
+    private static void append(StringBuilder buffer, NodeList nodeList) {
         int size = nodeList.getLength();
         for (int i = 0; i < size; i++) {
             append(buffer, nodeList.item(i));
         }
     }
 
-    private static void append(StringBuffer buffer, Node node) {
+    private static void append(StringBuilder buffer, Node node) {
         if (node instanceof Text) {
             Text text = (Text) node;
             buffer.append(text.getTextContent());

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java Tue Apr 13 07:29:47 2010
@@ -77,7 +77,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForCamelContext(CamelContext context) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_CONTEXT + ",");
@@ -86,7 +86,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForEndpoint(Endpoint endpoint) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(endpoint.getCamelContext())).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_ENDPOINT + ",");
@@ -95,7 +95,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForComponent(Component component, String name) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(component.getCamelContext())).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_COMPONENT + ",");
@@ -104,7 +104,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForProcessor(CamelContext context, Processor processor, ProcessorDefinition<?> definition) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=").append(TYPE_PROCESSOR).append(",");
@@ -123,7 +123,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder builder) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(routeContext.getCamelContext())).append(",");
         buffer.append(KEY_TYPE + "=").append(TYPE_ERRORHANDLER).append(",");
@@ -165,7 +165,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForConsumer(CamelContext context, Consumer consumer) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=").append(TYPE_CONSUMER).append(",");
@@ -181,7 +181,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForProducer(CamelContext context, Producer producer) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=").append(TYPE_PRODUCER).append(",");
@@ -197,7 +197,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForTracer(CamelContext context, InterceptStrategy tracer) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_TRACER + ",");
@@ -211,7 +211,7 @@ public class DefaultManagementNamingStra
         Endpoint ep = route.getEndpoint();
         String id = route.getId();
 
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(ep.getCamelContext())).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_ROUTE + ",");
@@ -220,7 +220,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForService(CamelContext context, Service service) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_SERVICE + ",");
@@ -231,7 +231,7 @@ public class DefaultManagementNamingStra
     }
 
     public ObjectName getObjectNameForThreadPool(CamelContext context, ThreadPoolExecutor threadPool) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_THREAD_POOL + ",");
@@ -277,7 +277,7 @@ public class DefaultManagementNamingStra
     /**
      * Factory method to create an ObjectName escaping any required characters
      */
-    protected ObjectName createObjectName(StringBuffer buffer) throws MalformedObjectNameException {
+    protected ObjectName createObjectName(StringBuilder buffer) throws MalformedObjectNameException {
         String text = buffer.toString();
         try {
             return new ObjectName(text);

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaValidationException.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaValidationException.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaValidationException.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/SchemaValidationException.java Tue Apr 13 07:29:47 2010
@@ -75,7 +75,7 @@ public class SchemaValidationException e
 
     protected static String message(Object schema, List<SAXParseException> fatalErrors,
                                     List<SAXParseException> errors, List<SAXParseException> warnings) {
-        StringBuffer buffer = new StringBuffer("Validation failed for: ");
+        StringBuilder buffer = new StringBuilder("Validation failed for: ");
         buffer.append(schema);
 
         if (!fatalErrors.isEmpty()) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java Tue Apr 13 07:29:47 2010
@@ -860,7 +860,7 @@ public final class ObjectHelper {
         if (objects == null) {
             return "null";
         } else {
-            StringBuffer buffer = new StringBuffer("{");
+            StringBuilder buffer = new StringBuilder("{");
             int counter = 0;
             for (Object object : objects) {
                 if (counter++ > 0) {
@@ -1102,7 +1102,7 @@ public final class ObjectHelper {
      * @return normalized classname that can be load by a class loader.
      */
     public static String normalizeClassName(String name) {
-        StringBuffer sb = new StringBuffer(name.length());
+        StringBuilder sb = new StringBuilder(name.length());
         for (char ch : name.toCharArray()) {
             if (ch == '.' || ch == '[' || ch == ']' || ch == '-' || Character.isJavaIdentifierPart(ch)) {
                 sb.append(ch);

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/PackageHelper.java Tue Apr 13 07:29:47 2010
@@ -50,7 +50,7 @@ public final class PackageHelper {
                     // lets remove any extra dots in the string...
                     int idx = value.indexOf('.');
                     if (idx >= 0) {
-                        StringBuffer buffer = new StringBuffer(value.substring(0, ++idx));
+                        StringBuilder buffer = new StringBuilder(value.substring(0, ++idx));
                         int i = idx;
                         for (int size = value.length(); i < size; i++) {
                             char ch = value.charAt(i);

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/URISupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/URISupport.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/URISupport.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/URISupport.java Tue Apr 13 07:29:47 2010
@@ -27,8 +27,6 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.camel.ResolveEndpointFailedException;
-
 /**
  * URI utilities.
  *
@@ -109,7 +107,7 @@ public final class URISupport {
     public static String createQueryString(Map<Object, Object> options) throws URISyntaxException {
         try {
             if (options.size() > 0) {
-                StringBuffer rc = new StringBuffer();
+                StringBuilder rc = new StringBuilder();
                 boolean first = true;
                 for (Object o : options.keySet()) {
                     if (first) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/UnsafeUriCharactersEncoder.java Tue Apr 13 07:29:47 2010
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.util;
 
-import java.io.UnsupportedEncodingException;
 import java.util.BitSet;
 
 import org.apache.commons.logging.Log;
@@ -75,7 +74,7 @@ public final class UnsafeUriCharactersEn
         }
 
         // okay there are some unsafe characters so we do need to encode
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (char ch : chars) {
             if (ch > 0 && ch < 128 && unsafeCharacters.get(ch)) {
                 appendEscape(sb, (byte)ch);
@@ -87,7 +86,7 @@ public final class UnsafeUriCharactersEn
 
     }
 
-    private static void appendEscape(StringBuffer sb, byte b) {
+    private static void appendEscape(StringBuilder sb, byte b) {
         sb.append('%');
         sb.append(HEX_DIGITS[(b >> 4) & 0x0f]);
         sb.append(HEX_DIGITS[(b >> 0) & 0x0f]);

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java Tue Apr 13 07:29:47 2010
@@ -180,7 +180,7 @@ public class NodeData {
      */
     public static String insertSpacesBetweenCamelCase(String name) {
         boolean lastCharacterLowerCase = false;
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         int i = 0;
         for (int size = name.length(); i < size; i++) {
             char ch = name.charAt(i);

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/LogDebugBodyMaxCharsTest.java Tue Apr 13 07:29:47 2010
@@ -34,7 +34,7 @@ public class LogDebugBodyMaxCharsTest ex
 
     public void testLogBodyMaxLengthTest() throws Exception {
         // create a big body
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < 1000; i++) {
             int value = i % 10;
             sb.append(value);

Modified: camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java (original)
+++ camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java Tue Apr 13 07:29:47 2010
@@ -221,7 +221,7 @@ public class BindyCsvFactory extends Bin
 
     public String unbind(Map<String, Object> model) throws Exception {
 
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         results = new HashMap<Integer, List>();
 
         // Check if separator exists

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/complex/onetomany/Order.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/complex/onetomany/Order.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/complex/onetomany/Order.java (original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/complex/onetomany/Order.java Tue Apr 13 07:29:47 2010
@@ -97,7 +97,7 @@ public class Order {
 
     @Override
     public String toString() {
-        StringBuffer temp = new StringBuffer();
+        StringBuilder temp = new StringBuilder();
         temp.append(Order.class.getName() + " --> 1: " + this.account + ", 11: " + this.clOrdId + ", 58: " + this.text);
         temp.append("\r");
 

Modified: camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HMACAccumulator.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HMACAccumulator.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HMACAccumulator.java (original)
+++ camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HMACAccumulator.java Tue Apr 13 07:29:47 2010
@@ -182,7 +182,7 @@ public class HMACAccumulator {
         }
 
         public String show() {
-            StringBuffer b = new StringBuffer(HexUtils.byteArrayToHexString(buffer)).append("\n");
+            StringBuilder b = new StringBuilder(HexUtils.byteArrayToHexString(buffer)).append("\n");
             for (int x = read; --x >= 0;) {
                 b.append("--");
             }

Modified: camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HexUtils.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HexUtils.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HexUtils.java (original)
+++ camel/trunk/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/HexUtils.java Tue Apr 13 07:29:47 2010
@@ -39,7 +39,7 @@ public final class HexUtils {
     public static  String byteArrayToHexString(byte in[], int start, int length) {
         String asHexString = null;
         if (in != null) {
-            StringBuffer out = new StringBuffer(in.length * 2);
+            StringBuilder out = new StringBuilder(in.length * 2);
             for (int x = start; x < length; x++) {
                 int nybble = in[x] & 0xF0;
                 nybble = nybble >>> 4;

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java Tue Apr 13 07:29:47 2010
@@ -50,7 +50,7 @@ public class CxfPayload<T> {
     
     public String toString() {
         XmlConverter converter = new XmlConverter();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append(getClass().getName());
         buf.append(" headers: " + headers);
         // go through the list of element and turn it into String

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java (original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java Tue Apr 13 07:29:47 2010
@@ -204,7 +204,7 @@ public class CxfRsProducer extends Defau
     }
     
     private String arrayToString(Object[] array) {
-        StringBuffer buffer = new StringBuffer("[");
+        StringBuilder buffer = new StringBuilder("[");
         for (Object obj : array) {
             if (buffer.length() > 2) {
                 buffer.append(",");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java Tue Apr 13 07:29:47 2010
@@ -37,12 +37,12 @@ public class ConverterTest extends Asser
     public void testToClassesList() throws Exception {
         String classString = "java.lang.String, "
             + "org.apache.camel.component.cxf.converter.ConverterTest ;"
-            + "java.lang.StringBuffer";
+            + "java.lang.StringBuilder";
         List<Class> classList = CxfConverter.toClassList(classString);
         assertEquals("Get the wrong number of classes", classList.size(), 3);
         assertEquals("Get the wrong the class", classList.get(0), String.class);
         assertEquals("Get the wrong the class", classList.get(1), ConverterTest.class);
-        assertEquals("Get the wrong the class", classList.get(2), StringBuffer.class);
+        assertEquals("Get the wrong the class", classList.get(2), StringBuilder.class);
     }
     
     @Test

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBindingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBindingTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBindingTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthAuthorizeBindingTest.java Tue Apr 13 07:29:47 2010
@@ -44,7 +44,7 @@ public class GAuthAuthorizeBindingTest {
     public static void setUpClass() throws Exception {
         component = createComponent();
         binding = new GAuthAuthorizeBinding();
-        StringBuffer buffer = new StringBuffer("gauth:authorize")
+        StringBuilder buffer = new StringBuilder("gauth:authorize")
             .append("?").append("scope=" + encode("http://scope.example.org", "UTF-8"))
             .append("&").append("callback=" + encode("http://test.example.org/handler", "UTF-8"));
         endpoint = component.createEndpoint(buffer.toString());

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthEndpointTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthEndpointTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/auth/GAuthEndpointTest.java Tue Apr 13 07:29:47 2010
@@ -42,7 +42,7 @@ public class GAuthEndpointTest {
     @Test
     public void testCustomParams() throws Exception {
         String scope = "http://scope1.example.org,http://scope2.example.org";
-        StringBuffer buffer = new StringBuffer("gauth://authorize")
+        StringBuilder buffer = new StringBuilder("gauth://authorize")
             .append("?").append("scope=" + encode(scope, "UTF-8"))
             .append("&").append("callback=" + encode("http://callback.example.org", "UTF-8"))
             .append("&").append("consumerKey=customConsumerKey")

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/http/GHttpEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/http/GHttpEndpointTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/http/GHttpEndpointTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/http/GHttpEndpointTest.java Tue Apr 13 07:29:47 2010
@@ -51,7 +51,7 @@ public class GHttpEndpointTest {
     
     @Test
     public void testPropertiesCustom() throws Exception {
-        StringBuffer buffer = new StringBuffer("ghttp://somewhere.com/path")
+        StringBuilder buffer = new StringBuilder("ghttp://somewhere.com/path")
             .append("?").append("a=b")
             .append(AMP).append("bridgeEndpoint=false")
             .append(AMP).append("outboundBindingRef=#customBinding")

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginBindingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginBindingTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginBindingTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginBindingTest.java Tue Apr 13 07:29:47 2010
@@ -42,7 +42,7 @@ public class GLoginBindingTest {
     @BeforeClass
     public static void setUpClass() throws Exception {
         binding = new GLoginBinding();
-        StringBuffer buffer = new StringBuffer("glogin:test.appspot.com")
+        StringBuilder buffer = new StringBuilder("glogin:test.appspot.com")
             .append("?").append("userName=testUserName")
             .append("&").append("password=testPassword");
         endpoint = createEndpoint(buffer.toString());

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginEndpointTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginEndpointTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/login/GLoginEndpointTest.java Tue Apr 13 07:29:47 2010
@@ -28,7 +28,7 @@ public class GLoginEndpointTest {
     @Test
     public void testEndpointProperties() throws Exception {
         // test internet hostname
-        StringBuffer buffer = new StringBuffer("glogin:test.appspot.com")
+        StringBuilder buffer = new StringBuilder("glogin:test.appspot.com")
             .append("?").append("clientName=testClientName")
             .append("&").append("userName=testUserName")
             .append("&").append("password=testPassword");

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/mail/GMailEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/mail/GMailEndpointTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/mail/GMailEndpointTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/mail/GMailEndpointTest.java Tue Apr 13 07:29:47 2010
@@ -29,7 +29,7 @@ public class GMailEndpointTest {
     
     @Test
     public void testPropertiesCustom() throws Exception {
-        StringBuffer buffer = new StringBuffer("gmail:user1@gmail.com")
+        StringBuilder buffer = new StringBuilder("gmail:user1@gmail.com")
             .append("?").append("subject=test")
             .append(AMP).append("to=user2@gmail.com")
             .append(AMP).append("cc=user3@gmail.com")

Modified: camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/task/GTaskEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/task/GTaskEndpointTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/task/GTaskEndpointTest.java (original)
+++ camel/trunk/components/camel-gae/src/test/java/org/apache/camel/component/gae/task/GTaskEndpointTest.java Tue Apr 13 07:29:47 2010
@@ -41,7 +41,7 @@ public class GTaskEndpointTest {
     
     @Test
     public void testPropertiesCustom() throws Exception {
-        StringBuffer buffer = new StringBuffer("gtask:myqueue")
+        StringBuilder buffer = new StringBuilder("gtask:myqueue")
             .append("?").append("outboundBindingRef=#customBinding")
             .append(AMP).append("inboundBindingRef=#customBinding")
             .append(AMP).append("workerRoot=test");

Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7DataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7DataFormatTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7DataFormatTest.java (original)
+++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7DataFormatTest.java Tue Apr 13 07:29:47 2010
@@ -89,7 +89,7 @@ public class HL7DataFormatTest extends C
         String line1 = "MSH|^~\\&|MYSENDER|MYSENDERAPP|MYCLIENT|MYCLIENTAPP|200612211200||QRY^A19|1234|P|2.4";
         String line2 = "QRD|200612211200|R|I|GetPatient|||1^RD|0101701234|DEM||";
 
-        StringBuffer body = new StringBuffer();
+        StringBuilder body = new StringBuilder();
         body.append(line1);
         body.append("\n");
         body.append(line2);

Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java (original)
+++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecStandAndEndBytesTest.java Tue Apr 13 07:29:47 2010
@@ -76,7 +76,7 @@ public class HL7MLLPCodecStandAndEndByte
         String line1 = "MSH|^~\\&|MYSENDER|MYRECEIVER|MYAPPLICATION||200612211200||QRY^A19|1234|P|2.4";
         String line2 = "QRD|200612211200|R|I|GetPatient|||1^RD|0101701234|DEM||";
 
-        StringBuffer in = new StringBuffer();
+        StringBuilder in = new StringBuilder();
         in.append(line1);
         in.append("\r");
         in.append(line2);

Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java (original)
+++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPCodecTest.java Tue Apr 13 07:29:47 2010
@@ -74,7 +74,7 @@ public class HL7MLLPCodecTest extends Ca
         String line1 = "MSH|^~\\&|MYSENDER|MYRECEIVER|MYAPPLICATION||200612211200||QRY^A19|1234|P|2.4";
         String line2 = "QRD|200612211200|R|I|GetPatient|||1^RD|0101701234|DEM||";
 
-        StringBuffer in = new StringBuffer();
+        StringBuilder in = new StringBuilder();
         in.append(line1);
         in.append("\n");
         in.append(line2);

Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java (original)
+++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7RouteTest.java Tue Apr 13 07:29:47 2010
@@ -59,7 +59,7 @@ public class HL7RouteTest extends CamelT
         String line1 = "MSH|^~\\&|MYSENDER|MYSENDERAPP|MYCLIENT|MYCLIENTAPP|200612211200||QRY^A19|1234|P|2.4";
         String line2 = "QRD|200612211200|R|I|GetPatient|||1^RD|0101701234|DEM||";
 
-        StringBuffer in = new StringBuffer();
+        StringBuilder in = new StringBuilder();
         in.append(line1);
         in.append("\n");
         in.append(line2);
@@ -82,7 +82,7 @@ public class HL7RouteTest extends CamelT
         String line1 = "MSH|^~\\&|MYSENDER|MYSENDERAPP|MYCLIENT|MYCLIENTAPP|200612211200||ADT^A01|1234|P|2.4";
         String line2 = "PID|||123456||Doe^John";
 
-        StringBuffer in = new StringBuffer();
+        StringBuilder in = new StringBuilder();
         in.append(line1);
         in.append("\n");
         in.append(line2);
@@ -104,7 +104,7 @@ public class HL7RouteTest extends CamelT
         String line1 = "MSH|^~\\&|MYSENDER|MYSENDERAPP|MYCLIENT|MYCLIENTAPP|200612211200||ADT^A02|1234|P|2.4";
         String line2 = "PID|||123456||Doe^John";
 
-        StringBuffer in = new StringBuffer();
+        StringBuilder in = new StringBuilder();
         in.append(line1);
         in.append("\n");
         in.append(line2);

Modified: camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7ValidateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7ValidateTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7ValidateTest.java (original)
+++ camel/trunk/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7ValidateTest.java Tue Apr 13 07:29:47 2010
@@ -78,7 +78,7 @@ public class HL7ValidateTest extends Cam
         String line7 = "OBR|2|213||GCU^Serum Copper ^ JRH06 |||200808080932||0.100||||||^|G999999^TestDoctor^GPtests^^^^^^NAT|819600|ADM162||||||820|||^^^^^R||||||||";
         String line8 = "OBR|3|213||THYG^Serum Thyroglobulin ^JRH06|||200808080932||0.100||||||^|G999999^TestDoctor^GPtests^^^^^^NAT|819600|ADM162||||||820|||^^^^^R||||||||";
 
-        StringBuffer body = new StringBuffer();
+        StringBuilder body = new StringBuilder();
         body.append(line1);
         body.append("\n");
         body.append(line2);

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsHammerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsHammerTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsHammerTest.java (original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsHammerTest.java Tue Apr 13 07:29:47 2010
@@ -41,7 +41,7 @@ public class JmsHammerTest extends Camel
     private int size = 10;
 
     public void prepareMessage() throws Exception {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < 20000; i++) {
             sb.append("hellothere");
         }

Modified: camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpLineDelimiterUsingPlainSocketTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpLineDelimiterUsingPlainSocketTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpLineDelimiterUsingPlainSocketTest.java (original)
+++ camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpLineDelimiterUsingPlainSocketTest.java Tue Apr 13 07:29:47 2010
@@ -106,7 +106,7 @@ public class MinaTcpLineDelimiterUsingPl
         }
 
         // convert the buffer to chars
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (byte b : buf) {
             char ch = (char) b;
             if (ch == '\r' || ch == 0) {

Modified: camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutUsingPlainSocketTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutUsingPlainSocketTest.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutUsingPlainSocketTest.java (original)
+++ camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpWithInOutUsingPlainSocketTest.java Tue Apr 13 07:29:47 2010
@@ -105,7 +105,7 @@ public class MinaTcpWithInOutUsingPlainS
         }
 
         // convert the buffer to chars
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (byte b : buf) {
             char ch = (char) b;
             if (ch == '\n' || ch == 0) {

Modified: camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/ReverseProtocolHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/ReverseProtocolHandler.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/ReverseProtocolHandler.java (original)
+++ camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/ReverseProtocolHandler.java Tue Apr 13 07:29:47 2010
@@ -36,7 +36,7 @@ public class ReverseProtocolHandler exte
     public void messageReceived(IoSession session, Object message) {
         // Reverse reveiced string
         String str = message.toString();
-        StringBuffer buf = new StringBuffer(str.length());
+        StringBuilder buf = new StringBuilder(str.length());
         for (int i = str.length() - 1; i >= 0; i--) {
             buf.append(str.charAt(i));
         }

Modified: camel/trunk/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpConverters.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpConverters.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpConverters.java (original)
+++ camel/trunk/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpConverters.java Tue Apr 13 07:29:47 2010
@@ -49,7 +49,7 @@ public final class SnmpConverters {
     @Converter
     public static String toString(PDU pdu) {
      // the output buffer
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         
         // prepare the header
         sb.append(SNMP_TAG_OPEN);

Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/UriCharactersEncoder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/UriCharactersEncoder.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/UriCharactersEncoder.java (original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/UriCharactersEncoder.java Tue Apr 13 07:29:47 2010
@@ -74,7 +74,7 @@ public final class UriCharactersEncoder 
         }
 
         // okay there are some unsafe characters so we do need to encode
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (char ch : chars) {
             if (ch > 0 && ch < 128 && unsafeCharacters.get(ch)) {
                 appendEscape(sb, (byte)ch);
@@ -85,7 +85,7 @@ public final class UriCharactersEncoder 
         return sb.toString();
     }
 
-    private static void appendEscape(StringBuffer sb, byte b) {
+    private static void appendEscape(StringBuilder sb, byte b) {
         sb.append('%');
         sb.append(HEX_DIGITS[(b >> 4) & 0x0f]);
         sb.append(HEX_DIGITS[(b >> 0) & 0x0f]);

Modified: camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/Delivery.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/Delivery.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/Delivery.java (original)
+++ camel/trunk/examples/camel-example-cafe/src/main/java/org/apache/camel/example/cafe/Delivery.java Tue Apr 13 07:29:47 2010
@@ -42,7 +42,7 @@ public class Delivery {
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer(SEPARATOR + "\n");
+        StringBuilder buffer = new StringBuilder(SEPARATOR + "\n");
         buffer.append("Order #" + getOrderNumber() + "\n");
         for (Drink drink : getDeliveredDrinks()) {
             buffer.append(drink);

Modified: camel/trunk/examples/camel-example-gae/src/main/java/org/apache/camel/example/gae/ReportGenerator.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gae/src/main/java/org/apache/camel/example/gae/ReportGenerator.java?rev=933507&r1=933506&r2=933507&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-gae/src/main/java/org/apache/camel/example/gae/ReportGenerator.java (original)
+++ camel/trunk/examples/camel-example-gae/src/main/java/org/apache/camel/example/gae/ReportGenerator.java Tue Apr 13 07:29:47 2010
@@ -41,7 +41,7 @@ public class ReportGenerator implements 
             temp = "<error retrieving current temperature>";
         }
         
-        exchange.getIn().setBody(new StringBuffer()
+        exchange.getIn().setBody(new StringBuilder()
             .append("\n").append("Weather report for:  ").append(city)
             .append("\n").append("Current condition:   ").append(cond)
             .append("\n").append("Current temperature: ").append(temp).append(" (Celsius)").toString());



Mime
View raw message