camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: CAMEL-7827 Fixed the CS errors.
Date Fri, 19 Sep 2014 05:59:06 GMT
CAMEL-7827 Fixed the CS errors.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/828c2b97
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/828c2b97
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/828c2b97

Branch: refs/heads/master
Commit: 828c2b97186183a33a3d1610b4c4407aa9ffe5cd
Parents: e4b224b
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Sep 19 13:44:48 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Sep 19 13:53:15 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java    | 6 +++---
 .../apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java    | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/828c2b97/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
index 59390de..7d6dec2 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
@@ -38,6 +38,7 @@ import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.LRUSoftCache;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.cxf.Bus;
 import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
 import org.apache.cxf.jaxrs.client.Client;
@@ -150,10 +151,9 @@ public class CxfRsProducer extends DefaultProducer {
 
         // set the path
         if (path != null) {
-            if(pathValues != null && pathValues.length > 0) {
+            if (ObjectHelper.isNotEmpty(pathValues) && pathValues.length > 0)
{
                 client.path(path, pathValues);
-            }
-            else {
+            } else {
                 client.path(path);
             }
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/828c2b97/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
index accb1f0..1ed46a7 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
@@ -249,8 +249,7 @@ public class CxfRsProducerTest extends CamelSpringTestSupport {
 
     @Test
     public void testGetCustomerWithVariableReplacementAndCxfRsEndpoint() {
-        Exchange exchange
-                = template.send("cxfrs://http://localhost:" + getPort1() + "/" + getClass().getSimpleName()
+ "/?httpClientAPI=true", new Processor() {
+        Exchange exchange = template.send("cxfrs://http://localhost:" + getPort1() + "/"
+ getClass().getSimpleName() + "/?httpClientAPI=true", new Processor() {
             public void process(Exchange exchange) throws Exception {
                 exchange.setPattern(ExchangePattern.InOut);
                 Message inMessage = exchange.getIn();


Mime
View raw message