Repository: camel
Updated Branches:
  refs/heads/master 050aa7d1b -> 2312fdc33


CAMEL-9419: Generate spring-boot auto configuration for all Camel components 
that has options that can be configured.


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

Branch: refs/heads/master
Commit: 2312fdc33e84bd8ae355f3806e85cd2a763ca2c2
Parents: 050aa7d
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sat Jun 11 08:19:28 2016 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sat Jun 11 08:19:28 2016 +0200

----------------------------------------------------------------------
 .../camel/component/stomp/StompComponent.java   | 24 ++++++++++++++++----
 1 file changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2312fdc3/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
 
b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
index c74becc..7355f31 100644
--- 
a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
+++ 
b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompComponent.java
@@ -70,7 +70,9 @@ public class StompComponent extends UriEndpointComponent {
     protected void doStart() throws Exception {
         super.doStart();
 
-        configuration.setBrokerURL(brokerUrl);
+        if (configuration == null) {
+            configuration = new StompConfiguration();
+        }
     }
 
     public StompConfiguration getConfiguration() {
@@ -88,27 +90,39 @@ public class StompComponent extends UriEndpointComponent {
      * The URI of the Stomp broker to connect to
      */
     public void setBrokerURL(String brokerURL) {
-        getConfiguration().setBrokerURL(brokerURL);
+        if (configuration == null) {
+            configuration = new StompConfiguration();
+        }
+        configuration.setBrokerURL(brokerURL);
     }
 
     /**
      * The username
      */
     public void setLogin(String login) {
-        getConfiguration().setLogin(login);
+        if (configuration == null) {
+            configuration = new StompConfiguration();
+        }
+        configuration.setLogin(login);
     }
 
     /**
      * The password
      */
     public void setPasscode(String passcode) {
-        getConfiguration().setPasscode(passcode);
+        if (configuration == null) {
+            configuration = new StompConfiguration();
+        }
+        configuration.setPasscode(passcode);
     }
     
     /**
      * The virtual host
      */
     public void setHost(String host) {
-        getConfiguration().setHost(host);
+        if (configuration == null) {
+            configuration = new StompConfiguration();
+        }
+        configuration.setHost(host);
     }
 }

Reply via email to