You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2018/03/23 03:41:01 UTC

[camel] branch master updated: [CAMEL-12345]enable allow.empty.path.template.value for camel-linkedin to keep the behavior as IS

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 270c480  [CAMEL-12345]enable allow.empty.path.template.value for camel-linkedin to keep the behavior as IS
270c480 is described below

commit 270c480b1af4ba0ebae76a73541e94722995b953
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Fri Mar 23 11:40:29 2018 +0800

    [CAMEL-12345]enable allow.empty.path.template.value for camel-linkedin to keep the behavior as IS
---
 .../java/org/apache/camel/component/linkedin/LinkedInEndpoint.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
index fb38d22..69519bd 100644
--- a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
+++ b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
@@ -40,9 +40,14 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.component.AbstractApiEndpoint;
 import org.apache.camel.util.component.ApiMethod;
 import org.apache.camel.util.component.ApiMethodPropertiesHelper;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxrs.client.AbstractClient;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
 import org.apache.cxf.jaxrs.client.WebClient;
 
+
 /**
  * The linkedin component is used for retrieving LinkedIn user profiles, connections, companies, groups, posts, etc.
  */
@@ -130,6 +135,8 @@ public class LinkedInEndpoint extends AbstractApiEndpoint<LinkedInApiName, Linke
         }
 
         // create endpoint proxy
+        Bus bus = BusFactory.getThreadDefaultBus();
+        bus.setProperty("allow.empty.path.template.value", true);
         resourceProxy = JAXRSClientFactory.create(LinkedInOAuthRequestFilter.BASE_ADDRESS, proxyClass,
             Arrays.asList(new Object[]{requestFilter, new EnumQueryParamConverterProvider()}));
     }

-- 
To stop receiving notification emails like this one, please contact
ffang@apache.org.