You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/12/02 07:38:42 UTC

[camel] branch master updated: CAMEL-14229: Fixed CS and polished

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

davsclaus 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 19acced  CAMEL-14229: Fixed CS and polished
19acced is described below

commit 19accede9ff391bc35efa413526c4bced8c5dc37
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Dec 2 08:38:11 2019 +0100

    CAMEL-14229: Fixed CS and polished
---
 components/camel-stomp/src/main/docs/stomp-component.adoc      |  2 +-
 .../org/apache/camel/component/stomp/StompConfiguration.java   |  4 ++--
 .../java/org/apache/camel/component/stomp/StompConsumer.java   |  4 ++--
 .../java/org/apache/camel/component/stomp/StompEndpoint.java   | 10 +++++-----
 .../builder/endpoint/dsl/StompEndpointBuilderFactory.java      |  6 +++---
 .../stomp/springboot/StompComponentConfiguration.java          |  2 +-
 6 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/components/camel-stomp/src/main/docs/stomp-component.adoc b/components/camel-stomp/src/main/docs/stomp-component.adoc
index 7f1a619..53cbbea 100644
--- a/components/camel-stomp/src/main/docs/stomp-component.adoc
+++ b/components/camel-stomp/src/main/docs/stomp-component.adoc
@@ -93,7 +93,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *brokerURL* (common) | *Required* The URI of the Stomp broker to connect to | tcp://localhost:61613 | String
 | *host* (common) | The virtual host name |  | String
-| *version* (common) | The STOMP Version |  | String
+| *version* (common) | The stomp version (1.1, or 1.2) |  | String
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean
 | *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
index e6ae895..c2dae0f 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConfiguration.java
@@ -110,10 +110,10 @@ public class StompConfiguration implements Cloneable {
     }
 
     /**
-     * The STOMP Version
+     * The stomp version (1.1, or 1.2)
      */
     public void setVersion(String version) {
-	this.version = version;
+        this.version = version;
     }
 
 }
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConsumer.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConsumer.java
index b493f62..dc2ed63 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConsumer.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompConsumer.java
@@ -50,8 +50,8 @@ public class StompConsumer extends DefaultConsumer {
 
     void processExchange(Exchange exchange) {
         try {
-	    exchange.getIn().getHeaders().entrySet().removeIf(e -> getEndpoint().getHeaderFilterStrategy()
-		    .applyFilterToExternalHeaders(e.getKey(), e.getValue(), exchange));
+            exchange.getIn().getHeaders().entrySet().removeIf(e -> getEndpoint().getHeaderFilterStrategy()
+                    .applyFilterToExternalHeaders(e.getKey(), e.getValue(), exchange));
             getProcessor().process(exchange);
         } catch (Throwable e) {
             exchange.setException(e);
diff --git a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
index 8e55dbb..3cde936 100644
--- a/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
+++ b/components/camel-stomp/src/main/java/org/apache/camel/component/stomp/StompEndpoint.java
@@ -99,9 +99,9 @@ public class StompEndpoint extends DefaultEndpoint implements AsyncEndpoint, Hea
         if (configuration.getSslContextParameters() != null) {
             stomp.setSslContext(configuration.getSslContextParameters().createSSLContext(getCamelContext()));
         }
-	if (configuration.getVersion() != null && !configuration.getVersion().isEmpty()) {
-	    stomp.setVersion(configuration.getVersion());
-	}
+        if (configuration.getVersion() != null && !configuration.getVersion().isEmpty()) {
+            stomp.setVersion(configuration.getVersion());
+        }
         stomp.connectCallback(promise);
         if (configuration.getHost() != null && !configuration.getHost().isEmpty()) {
             stomp.setHost(configuration.getHost());
@@ -125,8 +125,8 @@ public class StompEndpoint extends DefaultEndpoint implements AsyncEndpoint, Hea
                         if (!consumers.isEmpty()) {
                             Exchange exchange = createExchange();
                             exchange.getIn().setBody(value.content());
-			    exchange.getIn().setHeaders(value.headerMap().entrySet().stream()
-			            .collect(Collectors.toMap(e -> e.getKey().toString(), Map.Entry::getValue)));
+                            exchange.getIn().setHeaders(value.headerMap().entrySet().stream()
+                                    .collect(Collectors.toMap(e -> e.getKey().toString(), Map.Entry::getValue)));
                             for (StompConsumer consumer : consumers) {
                                 consumer.processExchange(exchange);
                             }
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/StompEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/StompEndpointBuilderFactory.java
index 7257829..6dd72e9 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/StompEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/StompEndpointBuilderFactory.java
@@ -67,7 +67,7 @@ public interface StompEndpointBuilderFactory {
             return this;
         }
         /**
-         * The STOMP Version.
+         * The stomp version (1.1, or 1.2).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -344,7 +344,7 @@ public interface StompEndpointBuilderFactory {
             return this;
         }
         /**
-         * The STOMP Version.
+         * The stomp version (1.1, or 1.2).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -568,7 +568,7 @@ public interface StompEndpointBuilderFactory {
             return this;
         }
         /**
-         * The STOMP Version.
+         * The stomp version (1.1, or 1.2).
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
diff --git a/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
index ca15594..e08ba72 100644
--- a/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-stomp-starter/src/main/java/org/apache/camel/component/stomp/springboot/StompComponentConfiguration.java
@@ -199,7 +199,7 @@ public class StompComponentConfiguration
          */
         private SSLContextParameters sslContextParameters;
         /**
-         * The STOMP Version
+         * The stomp version (1.1, or 1.2)
          */
         private String version;