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:25:25 UTC
svn commit: r1384455 - in /camel/branches/camel-2.9.x: ./
components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
Author: bvahdat
Date: Thu Sep 13 18:25:25 2012
New Revision: 1384455
URL: http://svn.apache.org/viewvc?rev=1384455&view=rev
Log:
Merged revisions 1384453 via svnmerge from
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x
................
r1384453 | bvahdat | 2012-09-13 20:20:35 +0200 (Do, 13 Sep 2012) | 9 lines
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.9.x/ (props changed)
camel/branches/camel-2.9.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1384447
Merged /camel/branches/camel-2.10.x:r1384453
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.9.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java?rev=1384455&r1=1384454&r2=1384455&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java (original)
+++ camel/branches/camel-2.9.x/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletEndpoint.java Thu Sep 13 18:25:25 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 {