You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2012/09/13 20:20:36 UTC

svn commit: r1384453 - in /camel/branches/camel-2.10.x: ./ components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java

Author: bvahdat
Date: Thu Sep 13 18:20:35 2012
New Revision: 1384453

URL: http://svn.apache.org/viewvc?rev=1384453&view=rev
Log:
Merged revisions 1384447 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1384447 | bvahdat | 2012-09-13 20:09:47 +0200 (Do, 13 Sep 2012) | 1 line
  
  CAMEL-5600: Do make use of the CollectionStringBuffer utility to create a comma seperated list of Strings (with thanks to Claus Ibsen for suggesting this).
........

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1384447

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java?rev=1384453&r1=1384452&r2=1384453&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java (original)
+++ camel/branches/camel-2.10.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java Thu Sep 13 18:20:35 2012
@@ -26,6 +26,7 @@ import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.spi.HeaderFilterStrategyAware;
+import org.apache.camel.util.CollectionStringBuffer;
 import org.restlet.data.Method;
 
 /**
@@ -189,16 +190,10 @@ public class RestletEndpoint extends Def
     // Update the endpointUri with the restlet method information
     protected void updateEndpointUri() {
         String endpointUri = getEndpointUri();
-        StringBuffer methods = new StringBuffer();
+        CollectionStringBuffer methods = new CollectionStringBuffer(",");
         if (getRestletMethods() != null && getRestletMethods().length > 0) {
             // list the method(s) as a comma seperated list
-            boolean first = true;
             for (Method method : getRestletMethods()) {
-                if (first) {
-                    first = false;
-                } else {
-                    methods.append(',');
-                }
                 methods.append(method.getName());
             }
         } else {