You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/12/10 15:14:00 UTC

[camel] branch master updated: CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - Splunk Component

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

acosentino 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 29af694  CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - Splunk Component
29af694 is described below

commit 29af6946ab71edfb128d036b409bda29bdcb50eb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 10 16:13:31 2019 +0100

    CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - Splunk Component
---
 .../main/java/org/apache/camel/component/splunk/SplunkComponent.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkComponent.java b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkComponent.java
index 929fed9..26ea605 100644
--- a/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkComponent.java
+++ b/components/camel-splunk/src/main/java/org/apache/camel/component/splunk/SplunkComponent.java
@@ -38,9 +38,10 @@ public class SplunkComponent extends DefaultComponent {
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
         SplunkConfiguration configuration = splunkConfigurationFactory.parseMap(parameters);
+        SplunkEndpoint answer = new SplunkEndpoint(uri, this, configuration);
+        setProperties(answer, parameters);
         configuration.setName(remaining);
-        setProperties(configuration, parameters);
-        return new SplunkEndpoint(uri, this, configuration);
+        return answer;
     }
 
     public SplunkConfigurationFactory getSplunkConfigurationFactory() {