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 2020/01/02 08:48:17 UTC

[camel] branch master updated (9bcb94a -> 550cada)

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

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


    from 9bcb94a  CAMEL-14342: Add cacheSize option to @RecipientList EIP annotation
     new fd31b31  CAMEL-14346 - Camel-CoAP: Add a recommendedCipherSuitesOnly option to the endpoint
     new 64e8b84  Camel-CoAP: Fixed CS
     new 550cada  CAMEL-14346 - Regen

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel-coap/src/main/docs/coap-component.adoc   |   3 +-
 .../org/apache/camel/coap/CamelCoapResource.java   |  19 ++--
 .../java/org/apache/camel/coap/CoAPComponent.java  |   8 +-
 .../java/org/apache/camel/coap/CoAPConsumer.java   |   8 +-
 .../java/org/apache/camel/coap/CoAPEndpoint.java   | 106 +++++++++++++--------
 .../java/org/apache/camel/coap/CoAPHelper.java     |   8 +-
 .../java/org/apache/camel/coap/CoAPProducer.java   |   2 +-
 .../java/org/apache/camel/coap/CoAPCORSTest.java   |   5 +-
 .../camel/coap/CoAPComponentTLSTestBase.java       |  66 ++++---------
 .../org/apache/camel/coap/CoAPComponentTest.java   |  18 +---
 .../camel/coap/CoAPConsumerDefaultPortTest.java    |   3 +-
 .../apache/camel/coap/CoAPMethodRestrictTest.java  |  15 +--
 .../java/org/apache/camel/coap/CoAPMethodTest.java |   9 +-
 .../java/org/apache/camel/coap/CoAPPingTest.java   |  15 +--
 .../camel/coap/CoAPRestComponentTestBase.java      |  17 ++--
 .../apache/camel/coap/CoAPRestContextPathTest.java |  10 +-
 .../org/apache/camel/coap/CoAPRestVerbTest.java    |   7 +-
 .../endpoint/dsl/CoAPEndpointBuilderFactory.java   |  84 ++++++++++++++++
 .../modules/ROOT/pages/coap-component.adoc         |   3 +-
 19 files changed, 231 insertions(+), 175 deletions(-)


[camel] 01/03: CAMEL-14346 - Camel-CoAP: Add a recommendedCipherSuitesOnly option to the endpoint

Posted by ac...@apache.org.
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

commit fd31b312f21d8ad92d2e4bfaccf11085497512f1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jan 2 09:13:22 2020 +0100

    CAMEL-14346 - Camel-CoAP: Add a recommendedCipherSuitesOnly option to the endpoint
---
 .../camel-coap/src/main/docs/coap-component.adoc   |  3 +-
 .../java/org/apache/camel/coap/CoAPEndpoint.java   | 20 +++++-
 .../endpoint/dsl/CoAPEndpointBuilderFactory.java   | 84 ++++++++++++++++++++++
 3 files changed, 104 insertions(+), 3 deletions(-)

diff --git a/components/camel-coap/src/main/docs/coap-component.adoc b/components/camel-coap/src/main/docs/coap-component.adoc
index 56c2a58..0ca4622 100644
--- a/components/camel-coap/src/main/docs/coap-component.adoc
+++ b/components/camel-coap/src/main/docs/coap-component.adoc
@@ -81,7 +81,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (15 parameters):
+=== Query Parameters (16 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -93,6 +93,7 @@ with the following path and query parameters:
 | *privateKey* (common) | Set the configured private key for use with Raw Public Key. |  | PrivateKey
 | *pskStore* (common) | Set the PskStore to use for pre-shared key. |  | PskStore
 | *publicKey* (common) | Set the configured public key for use with Raw Public Key. |  | PublicKey
+| *recommendedCipherSuitesOnly* (common) | The CBC cipher suites are not recommended. If you want to use them, you first need to set the recommendedCipherSuitesOnly option to false. | true | boolean
 | *sslContextParameters* (common) | Set the SSLContextParameters object for setting up TLS. This is required for coapstcp, and for coaps when we are using certificates for TLS (as opposed to RPK or PKS). |  | SSLContextParameters
 | *trustedRpkStore* (common) | Set the TrustedRpkStore to use to determine trust in raw public keys. |  | TrustedRpkStore
 | *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
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
index f7b0db4..9d21a28 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
@@ -81,6 +81,9 @@ public class CoAPEndpoint extends DefaultEndpoint {
 
     @UriParam
     private SSLContextParameters sslContextParameters;
+    
+    @UriParam(defaultValue = "true")
+    private boolean recommendedCipherSuitesOnly = true;
 
     private CoAPComponent component;
 
@@ -270,7 +273,19 @@ public class CoAPEndpoint extends DefaultEndpoint {
         this.clientAuthentication = clientAuthentication;
     }
 
-    public boolean isClientAuthenticationRequired() {
+    public boolean isRecommendedCipherSuitesOnly() {
+		return recommendedCipherSuitesOnly;
+	}
+
+    /**
+     * The CBC cipher suites are not recommended. If you want to use them, you first need to set the recommendedCipherSuitesOnly 
+     * option to false.  
+     */
+	public void setRecommendedCipherSuitesOnly(boolean recommendedCipherSuitesOnly) {
+		this.recommendedCipherSuitesOnly = recommendedCipherSuitesOnly;
+	}
+
+	public boolean isClientAuthenticationRequired() {
         String clientAuth = clientAuthentication;
         if (clientAuth == null && sslContextParameters != null && sslContextParameters.getServerParameters() != null) {
             clientAuth = sslContextParameters.getServerParameters().getClientAuthentication();
@@ -327,7 +342,7 @@ public class CoAPEndpoint extends DefaultEndpoint {
                 throw new IllegalStateException("Either a trustedRpkStore, sslContextParameters or pskStore object "
                                                 + "must be configured for a TLS client");
             }
-
+            builder.setRecommendedCipherSuitesOnly(isRecommendedCipherSuitesOnly());
             builder.setClientOnly();
         } else {
             if (privateKey == null && sslContextParameters == null && pskStore == null) {
@@ -345,6 +360,7 @@ public class CoAPEndpoint extends DefaultEndpoint {
             builder.setAddress(address);
             builder.setClientAuthenticationRequired(isClientAuthenticationRequired());
             builder.setClientAuthenticationWanted(isClientAuthenticationWanted());
+            builder.setRecommendedCipherSuitesOnly(isRecommendedCipherSuitesOnly());
         }
 
         try {
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/CoAPEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/CoAPEndpointBuilderFactory.java
index 240add2..e4c479a 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/CoAPEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/CoAPEndpointBuilderFactory.java
@@ -164,6 +164,34 @@ public interface CoAPEndpointBuilderFactory {
             return this;
         }
         /**
+         * The CBC cipher suites are not recommended. If you want to use them,
+         * you first need to set the recommendedCipherSuitesOnly option to
+         * false.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: common
+         */
+        default CoAPEndpointConsumerBuilder recommendedCipherSuitesOnly(
+                boolean recommendedCipherSuitesOnly) {
+            doSetProperty("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly);
+            return this;
+        }
+        /**
+         * The CBC cipher suites are not recommended. If you want to use them,
+         * you first need to set the recommendedCipherSuitesOnly option to
+         * false.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: common
+         */
+        default CoAPEndpointConsumerBuilder recommendedCipherSuitesOnly(
+                String recommendedCipherSuitesOnly) {
+            doSetProperty("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly);
+            return this;
+        }
+        /**
          * Set the SSLContextParameters object for setting up TLS. This is
          * required for coapstcp, and for coaps when we are using certificates
          * for TLS (as opposed to RPK or PKS).
@@ -519,6 +547,34 @@ public interface CoAPEndpointBuilderFactory {
             return this;
         }
         /**
+         * The CBC cipher suites are not recommended. If you want to use them,
+         * you first need to set the recommendedCipherSuitesOnly option to
+         * false.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: common
+         */
+        default CoAPEndpointProducerBuilder recommendedCipherSuitesOnly(
+                boolean recommendedCipherSuitesOnly) {
+            doSetProperty("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly);
+            return this;
+        }
+        /**
+         * The CBC cipher suites are not recommended. If you want to use them,
+         * you first need to set the recommendedCipherSuitesOnly option to
+         * false.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: common
+         */
+        default CoAPEndpointProducerBuilder recommendedCipherSuitesOnly(
+                String recommendedCipherSuitesOnly) {
+            doSetProperty("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly);
+            return this;
+        }
+        /**
          * Set the SSLContextParameters object for setting up TLS. This is
          * required for coapstcp, and for coaps when we are using certificates
          * for TLS (as opposed to RPK or PKS).
@@ -808,6 +864,34 @@ public interface CoAPEndpointBuilderFactory {
             return this;
         }
         /**
+         * The CBC cipher suites are not recommended. If you want to use them,
+         * you first need to set the recommendedCipherSuitesOnly option to
+         * false.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Group: common
+         */
+        default CoAPEndpointBuilder recommendedCipherSuitesOnly(
+                boolean recommendedCipherSuitesOnly) {
+            doSetProperty("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly);
+            return this;
+        }
+        /**
+         * The CBC cipher suites are not recommended. If you want to use them,
+         * you first need to set the recommendedCipherSuitesOnly option to
+         * false.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Group: common
+         */
+        default CoAPEndpointBuilder recommendedCipherSuitesOnly(
+                String recommendedCipherSuitesOnly) {
+            doSetProperty("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly);
+            return this;
+        }
+        /**
          * Set the SSLContextParameters object for setting up TLS. This is
          * required for coapstcp, and for coaps when we are using certificates
          * for TLS (as opposed to RPK or PKS).


[camel] 02/03: Camel-CoAP: Fixed CS

Posted by ac...@apache.org.
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

commit 64e8b84cf6676eefa0f3db58c1d151861605b7d3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jan 2 09:15:12 2020 +0100

    Camel-CoAP: Fixed CS
---
 .../org/apache/camel/coap/CamelCoapResource.java   |  19 ++--
 .../java/org/apache/camel/coap/CoAPComponent.java  |   8 +-
 .../java/org/apache/camel/coap/CoAPConsumer.java   |   8 +-
 .../java/org/apache/camel/coap/CoAPEndpoint.java   | 106 ++++++++++++---------
 .../java/org/apache/camel/coap/CoAPHelper.java     |   8 +-
 .../java/org/apache/camel/coap/CoAPProducer.java   |   2 +-
 .../java/org/apache/camel/coap/CoAPCORSTest.java   |   5 +-
 .../camel/coap/CoAPComponentTLSTestBase.java       |  66 ++++---------
 .../org/apache/camel/coap/CoAPComponentTest.java   |  18 +---
 .../camel/coap/CoAPConsumerDefaultPortTest.java    |   3 +-
 .../apache/camel/coap/CoAPMethodRestrictTest.java  |  15 +--
 .../java/org/apache/camel/coap/CoAPMethodTest.java |   9 +-
 .../java/org/apache/camel/coap/CoAPPingTest.java   |  15 +--
 .../camel/coap/CoAPRestComponentTestBase.java      |  17 ++--
 .../apache/camel/coap/CoAPRestContextPathTest.java |  10 +-
 .../org/apache/camel/coap/CoAPRestVerbTest.java    |   7 +-
 16 files changed, 135 insertions(+), 181 deletions(-)

diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java
index 0f130a0..658b4b0 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CamelCoapResource.java
@@ -44,7 +44,7 @@ final class CamelCoapResource extends CoapResource {
         super(name);
         this.possibles = possibles;
     }
-    
+
     void addConsumer(CoAPConsumer consumer) {
         CoAPEndpoint coapEndpoint = consumer.getCoapEndpoint();
         String coapMethodRestrict = CoAPHelper.getDefaultMethodRestrict(coapEndpoint.getCoapMethodRestrict());
@@ -52,11 +52,11 @@ final class CamelCoapResource extends CoapResource {
             consumers.put(method.trim(), consumer);
         }
     }
-    
+
     @Override
     public Resource getChild(String name) {
         if (possibles != null) {
-            //FIXME - find which might work...    
+            // FIXME - find which might work...
         }
         Resource child = super.getChild(name);
         if (child == null) {
@@ -75,6 +75,7 @@ final class CamelCoapResource extends CoapResource {
         }
         return child;
     }
+
     @Override
     public void handleRequest(Exchange exchange) {
         org.apache.camel.Exchange camelExchange = null;
@@ -92,7 +93,7 @@ final class CamelCoapResource extends CoapResource {
 
             camelExchange = consumer.getEndpoint().createExchange();
             consumer.createUoW(camelExchange);
-            
+
             OptionSet options = exchange.getRequest().getOptions();
             for (String s : options.getUriQuery()) {
                 int i = s.indexOf('=');
@@ -102,12 +103,12 @@ final class CamelCoapResource extends CoapResource {
                     camelExchange.getIn().setHeader(s.substring(0, i), s.substring(i + 1));
                 }
             }
-            
+
             if (options.hasContentFormat()) {
                 String mt = MediaTypeRegistry.toString(options.getContentFormat());
                 camelExchange.getIn().setHeader(org.apache.camel.Exchange.CONTENT_TYPE, mt);
             }
-            
+
             List<String> path = exchange.getRequest().getOptions().getUriPath();
             LinkedList<Resource> resources = new LinkedList<>();
             Resource r = this;
@@ -127,13 +128,13 @@ final class CamelCoapResource extends CoapResource {
                 }
                 res++;
             }
-            
+
             byte bytes[] = exchange.getCurrentRequest().getPayload();
             camelExchange.getIn().setBody(bytes);
 
             consumer.getProcessor().process(camelExchange);
             Message target = camelExchange.getMessage();
-            
+
             int format = MediaTypeRegistry.parse(target.getHeader(org.apache.camel.Exchange.CONTENT_TYPE, String.class));
             cexchange.respond(ResponseCode.CONTENT, target.getBody(byte[].class), format);
 
@@ -145,4 +146,4 @@ final class CamelCoapResource extends CoapResource {
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPComponent.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPComponent.java
index 53ee5bd..34e2653 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPComponent.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPComponent.java
@@ -91,8 +91,7 @@ public class CoAPComponent extends DefaultComponent implements RestConsumerFacto
                     } else if (endpoint.isClientAuthenticationWanted()) {
                         clientAuthMode = TlsServerConnector.ClientAuthMode.WANTED;
                     }
-                    tcpConnector =
-                        new TlsServerConnector(sslContext, clientAuthMode, address, tcpThreads, tlsHandshakeTimeout, tcpIdleTimeout);
+                    tcpConnector = new TlsServerConnector(sslContext, clientAuthMode, address, tcpThreads, tlsHandshakeTimeout, tcpIdleTimeout);
                 } else {
                     tcpConnector = new TcpServerConnector(address, tcpThreads, tcpIdleTimeout);
                 }
@@ -120,8 +119,9 @@ public class CoAPComponent extends DefaultComponent implements RestConsumerFacto
     }
 
     @Override
-    public Consumer createConsumer(CamelContext camelContext, Processor processor, String verb, String basePath,
-            String uriTemplate, String consumes, String produces, RestConfiguration configuration, Map<String, Object> parameters) throws Exception {
+    public Consumer createConsumer(CamelContext camelContext, Processor processor, String verb, String basePath, String uriTemplate, String consumes, String produces,
+                                   RestConfiguration configuration, Map<String, Object> parameters)
+        throws Exception {
 
         String path = basePath;
         if (uriTemplate != null) {
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConsumer.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConsumer.java
index b5639de..1af74c3 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConsumer.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPConsumer.java
@@ -33,17 +33,17 @@ public class CoAPConsumer extends DefaultConsumer {
 
     public CoAPConsumer(final CoAPEndpoint endpoint, final Processor processor) {
         super(endpoint, processor);
-        this.endpoint = endpoint;        
+        this.endpoint = endpoint;
     }
-    
+
     public CoAPEndpoint getCoapEndpoint() {
         return endpoint;
     }
-    
+
     @Override
     protected void doStart() throws Exception {
         super.doStart();
-        
+
         String path = endpoint.getUri().getPath();
         if (path.startsWith("/")) {
             path = path.substring(1);
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
index 9d21a28..fde6865 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java
@@ -47,7 +47,8 @@ import org.eclipse.californium.scandium.dtls.pskstore.PskStore;
 import org.eclipse.californium.scandium.dtls.rpkstore.TrustedRpkStore;
 
 /**
- * The coap component is used for sending and receiving messages from COAP capable devices.
+ * The coap component is used for sending and receiving messages from COAP
+ * capable devices.
  */
 @UriEndpoint(firstVersion = "2.16.0", scheme = "coap,coaps,coap+tcp,coaps+tcp", title = "CoAP", syntax = "coap:uri", label = "iot")
 public class CoAPEndpoint extends DefaultEndpoint {
@@ -81,7 +82,7 @@ public class CoAPEndpoint extends DefaultEndpoint {
 
     @UriParam
     private SSLContextParameters sslContextParameters;
-    
+
     @UriParam(defaultValue = "true")
     private boolean recommendedCipherSuitesOnly = true;
 
@@ -102,7 +103,8 @@ public class CoAPEndpoint extends DefaultEndpoint {
     }
 
     /**
-     * Comma separated list of methods that the CoAP consumer will bind to. The default is to bind to all methods (DELETE, GET, POST, PUT).
+     * Comma separated list of methods that the CoAP consumer will bind to. The
+     * default is to bind to all methods (DELETE, GET, POST, PUT).
      */
     public String getCoapMethodRestrict() {
         return this.coapMethodRestrict;
@@ -134,38 +136,44 @@ public class CoAPEndpoint extends DefaultEndpoint {
     }
 
     /**
-     * Gets the alias used to query the KeyStore for the private key and certificate. This parameter is used
-     * when we are enabling TLS with certificates on the service side, and similarly on the client side when
-     * TLS is used with certificates and client authentication. If the parameter is not specified then the
-     * default behavior is to use the first alias in the keystore that contains a key entry. This configuration
-     * parameter does not apply to configuring TLS via a Raw Public Key or a Pre-Shared Key.
+     * Gets the alias used to query the KeyStore for the private key and
+     * certificate. This parameter is used when we are enabling TLS with
+     * certificates on the service side, and similarly on the client side when
+     * TLS is used with certificates and client authentication. If the parameter
+     * is not specified then the default behavior is to use the first alias in
+     * the keystore that contains a key entry. This configuration parameter does
+     * not apply to configuring TLS via a Raw Public Key or a Pre-Shared Key.
      */
     public String getAlias() {
         return alias;
     }
 
     /**
-     * Sets the alias used to query the KeyStore for the private key and certificate. This parameter is used
-     * when we are enabling TLS with certificates on the service side, and similarly on the client side when
-     * TLS is used with certificates and client authentication. If the parameter is not specified then the
-     * default behavior is to use the first alias in the keystore that contains a key entry. This configuration
-     * parameter does not apply to configuring TLS via a Raw Public Key or a Pre-Shared Key.
+     * Sets the alias used to query the KeyStore for the private key and
+     * certificate. This parameter is used when we are enabling TLS with
+     * certificates on the service side, and similarly on the client side when
+     * TLS is used with certificates and client authentication. If the parameter
+     * is not specified then the default behavior is to use the first alias in
+     * the keystore that contains a key entry. This configuration parameter does
+     * not apply to configuring TLS via a Raw Public Key or a Pre-Shared Key.
      */
     public void setAlias(String alias) {
         this.alias = alias;
     }
 
     /**
-     * Get the SSLContextParameters object for setting up TLS. This is required for coaps+tcp, and for coaps when we are
-     * using certificates for TLS (as opposed to RPK or PKS).
+     * Get the SSLContextParameters object for setting up TLS. This is required
+     * for coaps+tcp, and for coaps when we are using certificates for TLS (as
+     * opposed to RPK or PKS).
      */
     public SSLContextParameters getSslContextParameters() {
         return sslContextParameters;
     }
 
     /**
-     * Set the SSLContextParameters object for setting up TLS. This is required for coaps+tcp, and for coaps when we are
-     * using certificates for TLS (as opposed to RPK or PKS).
+     * Set the SSLContextParameters object for setting up TLS. This is required
+     * for coaps+tcp, and for coaps when we are using certificates for TLS (as
+     * opposed to RPK or PKS).
      */
     public void setSslContextParameters(SSLContextParameters sslContextParameters) {
         this.sslContextParameters = sslContextParameters;
@@ -228,16 +236,18 @@ public class CoAPEndpoint extends DefaultEndpoint {
     }
 
     /**
-     * Gets the cipherSuites String. This is a comma separated String of ciphersuites to configure. If it is not
-     * specified, then it falls back to getting the ciphersuites from the sslContextParameters object.
+     * Gets the cipherSuites String. This is a comma separated String of
+     * ciphersuites to configure. If it is not specified, then it falls back to
+     * getting the ciphersuites from the sslContextParameters object.
      */
     public String getCipherSuites() {
         return cipherSuites;
     }
 
     /**
-     * Sets the cipherSuites String. This is a comma separated String of ciphersuites to configure. If it is not
-     * specified, then it falls back to getting the ciphersuites from the sslContextParameters object.
+     * Sets the cipherSuites String. This is a comma separated String of
+     * ciphersuites to configure. If it is not specified, then it falls back to
+     * getting the ciphersuites from the sslContextParameters object.
      */
     public void setCipherSuites(String cipherSuites) {
         this.cipherSuites = cipherSuites;
@@ -256,36 +266,40 @@ public class CoAPEndpoint extends DefaultEndpoint {
     }
 
     /**
-     * Gets the configuration options for server-side client-authentication requirements. The value is
-     * either null or one of NONE, WANT, REQUIRE. If this value is not specified, then it falls back
-     * to checking the sslContextParameters.getServerParameters().getClientAuthentication() value.
+     * Gets the configuration options for server-side client-authentication
+     * requirements. The value is either null or one of NONE, WANT, REQUIRE. If
+     * this value is not specified, then it falls back to checking the
+     * sslContextParameters.getServerParameters().getClientAuthentication()
+     * value.
      */
     public String getClientAuthentication() {
         return clientAuthentication;
     }
 
     /**
-     * Sets the configuration options for server-side client-authentication requirements.
-     * The value must be one of NONE, WANT, REQUIRE. If this value is not specified, then it falls back
-     * to checking the sslContextParameters.getServerParameters().getClientAuthentication() value.
+     * Sets the configuration options for server-side client-authentication
+     * requirements. The value must be one of NONE, WANT, REQUIRE. If this value
+     * is not specified, then it falls back to checking the
+     * sslContextParameters.getServerParameters().getClientAuthentication()
+     * value.
      */
     public void setClientAuthentication(String clientAuthentication) {
         this.clientAuthentication = clientAuthentication;
     }
 
     public boolean isRecommendedCipherSuitesOnly() {
-		return recommendedCipherSuitesOnly;
-	}
+        return recommendedCipherSuitesOnly;
+    }
 
     /**
-     * The CBC cipher suites are not recommended. If you want to use them, you first need to set the recommendedCipherSuitesOnly 
-     * option to false.  
+     * The CBC cipher suites are not recommended. If you want to use them, you
+     * first need to set the recommendedCipherSuitesOnly option to false.
      */
-	public void setRecommendedCipherSuitesOnly(boolean recommendedCipherSuitesOnly) {
-		this.recommendedCipherSuitesOnly = recommendedCipherSuitesOnly;
-	}
+    public void setRecommendedCipherSuitesOnly(boolean recommendedCipherSuitesOnly) {
+        this.recommendedCipherSuitesOnly = recommendedCipherSuitesOnly;
+    }
 
-	public boolean isClientAuthenticationRequired() {
+    public boolean isClientAuthenticationRequired() {
         String clientAuth = clientAuthentication;
         if (clientAuth == null && sslContextParameters != null && sslContextParameters.getServerParameters() != null) {
             clientAuth = sslContextParameters.getServerParameters().getClientAuthentication();
@@ -313,7 +327,7 @@ public class CoAPEndpoint extends DefaultEndpoint {
             List<Certificate> trustCerts = new ArrayList<>();
             while (aliases.hasMoreElements()) {
                 String alias = aliases.nextElement();
-                X509Certificate cert = (X509Certificate) trustStore.getCertificate(alias);
+                X509Certificate cert = (X509Certificate)trustStore.getCertificate(alias);
                 if (cert != null) {
                     trustCerts.add(cert);
                 }
@@ -325,7 +339,6 @@ public class CoAPEndpoint extends DefaultEndpoint {
         return new Certificate[0];
     }
 
-
     public static boolean enableDTLS(URI uri) {
         return "coaps".equals(uri.getScheme());
     }
@@ -339,21 +352,19 @@ public class CoAPEndpoint extends DefaultEndpoint {
         DtlsConnectorConfig.Builder builder = new DtlsConnectorConfig.Builder();
         if (client) {
             if (trustedRpkStore == null && sslContextParameters == null && pskStore == null) {
-                throw new IllegalStateException("Either a trustedRpkStore, sslContextParameters or pskStore object "
-                                                + "must be configured for a TLS client");
+                throw new IllegalStateException("Either a trustedRpkStore, sslContextParameters or pskStore object " + "must be configured for a TLS client");
             }
             builder.setRecommendedCipherSuitesOnly(isRecommendedCipherSuitesOnly());
             builder.setClientOnly();
         } else {
             if (privateKey == null && sslContextParameters == null && pskStore == null) {
-                throw new IllegalStateException("Either a privateKey, sslContextParameters or pskStore object "
-                                                + "must be configured for a TLS service");
+                throw new IllegalStateException("Either a privateKey, sslContextParameters or pskStore object " + "must be configured for a TLS service");
             }
             if (privateKey != null && publicKey == null) {
                 throw new IllegalStateException("A public key must be configured to use a Raw Public Key with TLS");
             }
-            if ((isClientAuthenticationRequired() || isClientAuthenticationWanted())
-                && (sslContextParameters == null || sslContextParameters.getTrustManagers() == null) && publicKey == null) {
+            if ((isClientAuthenticationRequired() || isClientAuthenticationWanted()) && (sslContextParameters == null || sslContextParameters.getTrustManagers() == null)
+                && publicKey == null) {
                 throw new IllegalStateException("A truststore must be configured to support TLS client authentication");
             }
 
@@ -364,12 +375,14 @@ public class CoAPEndpoint extends DefaultEndpoint {
         }
 
         try {
-            // Configure the identity if the sslContextParameters or privateKey parameter is specified
+            // Configure the identity if the sslContextParameters or privateKey
+            // parameter is specified
             if (sslContextParameters != null && sslContextParameters.getKeyManagers() != null) {
                 KeyManagersParameters keyManagers = sslContextParameters.getKeyManagers();
                 KeyStore keyStore = keyManagers.getKeyStore().createKeyStore();
 
-                // Use the configured alias or fall back to the first alias in the keystore that contains a key
+                // Use the configured alias or fall back to the first alias in
+                // the keystore that contains a key
                 String alias = getAlias();
                 if (alias == null) {
                     Enumeration<String> aliases = keyStore.aliases();
@@ -385,8 +398,7 @@ public class CoAPEndpoint extends DefaultEndpoint {
                     throw new IllegalStateException("The sslContextParameters keystore must contain a key entry");
                 }
 
-                PrivateKey privateKey =
-                    (PrivateKey)keyStore.getKey(alias, keyManagers.getKeyPassword().toCharArray());
+                PrivateKey privateKey = (PrivateKey)keyStore.getKey(alias, keyManagers.getKeyPassword().toCharArray());
                 builder.setIdentity(privateKey, keyStore.getCertificateChain(alias));
             } else if (privateKey != null) {
                 builder.setIdentity(privateKey, publicKey);
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPHelper.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPHelper.java
index 90d357c..298a967 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPHelper.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPHelper.java
@@ -29,8 +29,9 @@ public final class CoAPHelper {
     }
 
     /**
-     * Determines which CoAP request method to use based on the content of the target
-     * request URI, the message body or value from the CamelCoapMethod header.
+     * Determines which CoAP request method to use based on the content of the
+     * target request URI, the message body or value from the CamelCoapMethod
+     * header.
      *
      * @param exchange the exchange
      * @param client the CoAP client
@@ -50,7 +51,8 @@ public final class CoAPHelper {
     }
 
     /**
-     * Determines which method verbs the CoAP server should be restricted to handling.
+     * Determines which method verbs the CoAP server should be restricted to
+     * handling.
      *
      * @param methodRestrict
      * @return
diff --git a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
index bc946a7..39ffe30 100644
--- a/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
+++ b/components/camel-coap/src/main/java/org/apache/camel/coap/CoAPProducer.java
@@ -51,7 +51,7 @@ public class CoAPProducer extends DefaultProducer {
         CoapClient client = getClient(exchange);
         String ct = exchange.getIn().getHeader(Exchange.CONTENT_TYPE, String.class);
         if (ct == null) {
-            //?default?
+            // ?default?
             ct = "application/octet-stream";
         }
         String method = CoAPHelper.getDefaultMethod(exchange, client);
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java
index f9e4093..65d8246 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java
@@ -23,9 +23,8 @@ import org.eclipse.californium.core.CoapResponse;
 import org.junit.Test;
 
 /**
- * https://issues.apache.org/jira/browse/CAMEL-10985
- *
- * CORS configuration is ignored and REST endpoints function as per normal
+ * https://issues.apache.org/jira/browse/CAMEL-10985 CORS configuration is
+ * ignored and REST endpoints function as per normal
  */
 public class CoAPCORSTest extends CoAPTestSupport {
     private static final String COAP_RESPONSE = "{ \"foo\": \"bar\" }";
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
index 5d934a4..d9ff574 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTLSTestBase.java
@@ -208,7 +208,9 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
     }
 
     protected abstract String getProtocol();
+
     protected abstract boolean isPSKSupported();
+
     protected abstract boolean isRPKSupported();
 
     @Override
@@ -220,40 +222,27 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
             @Override
             public void configure() throws Exception {
 
-                fromF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#serviceSSLContextParameters", PORT)
-                    .transform(body().prepend("Hello "));
+                fromF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#serviceSSLContextParameters", PORT).transform(body().prepend("Hello "));
 
                 fromF(getProtocol() + "://localhost:%d/TestResource?alias=selfsigned&sslContextParameters=#selfSignedServiceSSLContextParameters", PORT2)
                     .transform(body().prepend("Hello "));
 
-                fromF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientAuthServiceSSLContextParameters", PORT3)
-                    .transform(body().prepend("Hello "));
+                fromF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientAuthServiceSSLContextParameters", PORT3).transform(body().prepend("Hello "));
 
                 fromF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#serviceSSLContextParameters&cipherSuites=TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8", PORT4)
                     .transform(body().prepend("Hello "));
 
-                from("direct:start")
-                    .toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientSSLContextParameters", PORT)
-                    .to("mock:result");
+                from("direct:start").toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientSSLContextParameters", PORT).to("mock:result");
 
-                from("direct:notruststore")
-                    .toF(getProtocol() + "://localhost:%d/TestResource", PORT)
-                    .to("mock:result");
+                from("direct:notruststore").toF(getProtocol() + "://localhost:%d/TestResource", PORT).to("mock:result");
 
-                from("direct:failedtrust")
-                    .toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientSSLContextParameters2", PORT)
-                    .to("mock:result");
+                from("direct:failedtrust").toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientSSLContextParameters2", PORT).to("mock:result");
 
-                from("direct:selfsigned")
-                    .toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#selfSignedClientSSLContextParameters", PORT2)
-                    .to("mock:result");
+                from("direct:selfsigned").toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#selfSignedClientSSLContextParameters", PORT2).to("mock:result");
 
-                from("direct:clientauth")
-                    .toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientAuthClientSSLContextParameters", PORT3)
-                    .to("mock:result");
+                from("direct:clientauth").toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientAuthClientSSLContextParameters", PORT3).to("mock:result");
 
-                from("direct:failedclientauth")
-                    .toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientAuthClientSSLContextParameters2", PORT3)
+                from("direct:failedclientauth").toF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#clientAuthClientSSLContextParameters2", PORT3)
                     .to("mock:result");
 
                 from("direct:ciphersuites")
@@ -261,46 +250,33 @@ abstract class CoAPComponentTLSTestBase extends CamelTestSupport {
                     .to("mock:result");
 
                 if (isRPKSupported()) {
-                    fromF(getProtocol() + "://localhost:%d/TestResource?privateKey=#privateKey&publicKey=#publicKey", PORT5)
-                        .transform(body().prepend("Hello "));
+                    fromF(getProtocol() + "://localhost:%d/TestResource?privateKey=#privateKey&publicKey=#publicKey", PORT5).transform(body().prepend("Hello "));
 
-                    fromF(getProtocol() + "://localhost:%d/TestResource?privateKey=#privateKey&publicKey=#publicKey&clientAuthentication=REQUIRE&trustedRpkStore=#trustedRpkStore", PORT6)
-                        .transform(body().prepend("Hello "));
+                    fromF(getProtocol() + "://localhost:%d/TestResource?privateKey=#privateKey&publicKey=#publicKey&clientAuthentication=REQUIRE&trustedRpkStore=#trustedRpkStore",
+                          PORT6).transform(body().prepend("Hello "));
 
-                    from("direct:rpk")
-                        .toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#trustedRpkStore", PORT5)
-                        .to("mock:result");
+                    from("direct:rpk").toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#trustedRpkStore", PORT5).to("mock:result");
 
-                    from("direct:rpknotruststore")
-                        .toF(getProtocol() + "://localhost:%d/TestResource", PORT5)
-                        .to("mock:result");
+                    from("direct:rpknotruststore").toF(getProtocol() + "://localhost:%d/TestResource", PORT5).to("mock:result");
 
-                    from("direct:rpkfailedtrust")
-                        .toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#failedTrustedRpkStore", PORT5)
-                        .to("mock:result");
+                    from("direct:rpkfailedtrust").toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#failedTrustedRpkStore", PORT5).to("mock:result");
 
                     from("direct:rpkclientauth")
-                        .toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#trustedRpkStore&privateKey=#privateKey&publicKey=#publicKey", PORT6)
-                        .to("mock:result");
+                        .toF(getProtocol() + "://localhost:%d/TestResource?trustedRpkStore=#trustedRpkStore&privateKey=#privateKey&publicKey=#publicKey", PORT6).to("mock:result");
                 }
 
                 if (isPSKSupported()) {
-                    fromF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore", PORT7)
-                        .transform(body().prepend("Hello "));
+                    fromF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore", PORT7).transform(body().prepend("Hello "));
 
                     fromF(getProtocol() + "://localhost:%d/TestResource?sslContextParameters=#serviceSSLContextParameters&pskStore=#pskStore", PORT8)
                         .transform(body().prepend("Hello "));
 
-                    from("direct:psk")
-                        .toF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore", PORT7)
-                        .to("mock:result");
+                    from("direct:psk").toF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore", PORT7).to("mock:result");
 
-                    from("direct:pskciphersuite")
-                        .toF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore&cipherSuites=TLS_PSK_WITH_AES_128_GCM_SHA256", PORT7)
+                    from("direct:pskciphersuite").toF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore&cipherSuites=TLS_PSK_WITH_AES_128_GCM_SHA256", PORT7)
                         .to("mock:result");
 
-                    from("direct:pskx509")
-                        .toF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore&sslContextParameters=#clientSSLContextParameters", PORT8)
+                    from("direct:pskx509").toF(getProtocol() + "://localhost:%d/TestResource?pskStore=#pskStore&sslContextParameters=#clientSSLContextParameters", PORT8)
                         .to("mock:result");
                 }
 
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
index aaad659..f3c9180 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPComponentTest.java
@@ -43,7 +43,7 @@ public class CoAPComponentTest extends CoAPTestSupport {
         CoapClient client = createClient("/TestResource");
         CoapResponse response = client.post("Camel", MediaTypeRegistry.TEXT_PLAIN);
         assertEquals("Hello Camel", response.getResponseText());
-        
+
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
         mock.expectedBodiesReceived("Hello Camel CoAP");
@@ -69,21 +69,13 @@ public class CoAPComponentTest extends CoAPTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                fromF("coap://localhost:%d/TestResource", PORT)
-                    .convertBodyTo(String.class)
-                    .transform(body().prepend("Hello "));
+                fromF("coap://localhost:%d/TestResource", PORT).convertBodyTo(String.class).transform(body().prepend("Hello "));
 
-                fromF("coap+tcp://localhost:%d/TestResource", TCP_PORT)
-                    .convertBodyTo(String.class)
-                    .transform(body().prepend("Hello "));
+                fromF("coap+tcp://localhost:%d/TestResource", TCP_PORT).convertBodyTo(String.class).transform(body().prepend("Hello "));
 
-                from("direct:start")
-                    .toF("coap://localhost:%d/TestResource", PORT)
-                    .to("mock:result");
+                from("direct:start").toF("coap://localhost:%d/TestResource", PORT).to("mock:result");
 
-                from("direct:starttcp")
-                    .toF("coap+tcp://localhost:%d/TestResource", TCP_PORT)
-                    .to("mock:result");
+                from("direct:starttcp").toF("coap+tcp://localhost:%d/TestResource", TCP_PORT).to("mock:result");
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPConsumerDefaultPortTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPConsumerDefaultPortTest.java
index 8c20b64..34f4184 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPConsumerDefaultPortTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPConsumerDefaultPortTest.java
@@ -35,8 +35,7 @@ public class CoAPConsumerDefaultPortTest extends CoAPTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("coap:localhost/greeting")
-                    .setBody(constant("Hello World"));
+                from("coap:localhost/greeting").setBody(constant("Hello World"));
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java
index 6ac2cee..4cfeeed 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodRestrictTest.java
@@ -64,20 +64,15 @@ public class CoAPMethodRestrictTest extends CoAPTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                fromF("coap://localhost:%d/test", PORT)
-                        .setBody(constant("GET: /test"));
+                fromF("coap://localhost:%d/test", PORT).setBody(constant("GET: /test"));
 
-                fromF("coap://localhost:%d/test/a?coapMethodRestrict=GET", PORT)
-                        .setBody(constant("GET: /test/a"));
+                fromF("coap://localhost:%d/test/a?coapMethodRestrict=GET", PORT).setBody(constant("GET: /test/a"));
 
-                fromF("coap://localhost:%d/test/a/b?coapMethodRestrict=DELETE", PORT)
-                        .setBody(constant("DELETE: /test/a/b"));
+                fromF("coap://localhost:%d/test/a/b?coapMethodRestrict=DELETE", PORT).setBody(constant("DELETE: /test/a/b"));
 
-                fromF("coap://localhost:%d/test/a/b/c?coapMethodRestrict=DELETE,GET", PORT)
-                        .setBody(constant("DELETE & GET: /test/a/b/c"));
+                fromF("coap://localhost:%d/test/a/b/c?coapMethodRestrict=DELETE,GET", PORT).setBody(constant("DELETE & GET: /test/a/b/c"));
 
-                fromF("coap://localhost:%d/test/b?coapMethodRestrict=GET", PORT)
-                        .setBody(constant("GET: /test/b"));
+                fromF("coap://localhost:%d/test/b?coapMethodRestrict=GET", PORT).setBody(constant("GET: /test/b"));
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodTest.java
index fd546c8..9840625 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPMethodTest.java
@@ -47,14 +47,11 @@ public class CoAPMethodTest extends CoAPTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                fromF("coap://localhost:%d/test/a?coapMethodRestrict=GET", PORT)
-                        .setBody(constant("GET: /test/a"));
+                fromF("coap://localhost:%d/test/a?coapMethodRestrict=GET", PORT).setBody(constant("GET: /test/a"));
 
-                fromF("coap://localhost:%d/test/b?coapMethodRestrict=POST", PORT)
-                        .setBody(simple("Hello ${body}"));
+                fromF("coap://localhost:%d/test/b?coapMethodRestrict=POST", PORT).setBody(simple("Hello ${body}"));
 
-                fromF("coap://localhost:%d/test/c?coapMethodRestrict=DELETE", PORT)
-                        .setBody(constant("DELETE: /test/c"));
+                fromF("coap://localhost:%d/test/c?coapMethodRestrict=DELETE", PORT).setBody(constant("DELETE: /test/c"));
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPPingTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPPingTest.java
index f81d2c8..c39bc79 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPPingTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPPingTest.java
@@ -26,7 +26,7 @@ public class CoAPPingTest extends CoAPTestSupport {
 
     @Produce("direct:start")
     protected ProducerTemplate sender;
-    
+
     @Test
     public void testCoAP() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
@@ -40,15 +40,10 @@ public class CoAPPingTest extends CoAPTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception { 
-                fromF("coap://localhost:%d/TestResource", PORT)
-                    .to("log:exch")
-                    .transform(body().convertTo(Boolean.class))
-                    .to("log:exch");
-                
-                from("direct:start")
-                    .toF("coap://localhost:%d/TestResource", PORT)
-                    .to("mock:result");
+            public void configure() throws Exception {
+                fromF("coap://localhost:%d/TestResource", PORT).to("log:exch").transform(body().convertTo(Boolean.class)).to("log:exch");
+
+                from("direct:start").toF("coap://localhost:%d/TestResource", PORT).to("mock:result");
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java
index 6e34eaa..0d35e89 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestComponentTestBase.java
@@ -110,7 +110,9 @@ abstract class CoAPRestComponentTestBase extends CamelTestSupport {
     }
 
     protected abstract String getProtocol();
+
     protected abstract void decorateClient(CoapClient client) throws GeneralSecurityException, IOException;
+
     protected abstract void decorateRestConfiguration(RestConfigurationDefinition restConfig);
 
     protected String getClientURI() {
@@ -122,17 +124,12 @@ abstract class CoAPRestComponentTestBase extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                RestConfigurationDefinition restConfig =
-                    restConfiguration("coap").scheme(getProtocol()).host("localhost").port(coapport);
+                RestConfigurationDefinition restConfig = restConfiguration("coap").scheme(getProtocol()).host("localhost").port(coapport);
                 decorateRestConfiguration(restConfig);
 
-                rest("/TestParams")
-                    .get().to("direct:get1")
-                    .post().to("direct:post1");
+                rest("/TestParams").get().to("direct:get1").post().to("direct:post1");
 
-                rest("/TestResource")
-                    .get("/{id}").to("direct:get1")
-                    .post("/{id}").to("direct:post1");
+                rest("/TestResource").get("/{id}").to("direct:get1").post("/{id}").to("direct:post1");
 
                 from("direct:get1").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
@@ -150,9 +147,7 @@ abstract class CoAPRestComponentTestBase extends CamelTestSupport {
                     }
                 });
 
-                from("direct:start")
-                    .toF(getClientURI(), coapport)
-                    .to("mock:result");
+                from("direct:start").toF(getClientURI(), coapport).to("mock:result");
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java
index 327b9be..b82c9b7 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java
@@ -37,15 +37,9 @@ public class CoAPRestContextPathTest extends CoAPTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                restConfiguration("coap")
-                    .host("localhost")
-                    .port(PORT)
-                    .contextPath("/rest/services");
+                restConfiguration("coap").host("localhost").port(PORT).contextPath("/rest/services");
 
-                rest("/test")
-                    .get("/a")
-                        .route()
-                            .setBody(constant("GET: /test/a"));
+                rest("/test").get("/a").route().setBody(constant("GET: /test/a"));
             }
         };
     }
diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java
index 233a255..0d708db 100644
--- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java
+++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java
@@ -84,11 +84,8 @@ public class CoAPRestVerbTest extends CoAPTestSupport {
             public void configure() throws Exception {
                 restConfiguration().component("coap").host("localhost").port(PORT);
 
-                rest()
-                    .get("/users").route().transform().constant("[{ \"id\":\"1\", \"name\":\"Scott\" },{ \"id\":\"2\", \"name\":\"Claus\" }]").endRest()
-                    .get("/users/{id}").route().transform().simple("{ \"id\":\"${header.id}\", \"name\":\"Scott\" }").endRest()
-                    .post("/users").to("mock:create")
-                    .put("/users/{id}").to("mock:update")
+                rest().get("/users").route().transform().constant("[{ \"id\":\"1\", \"name\":\"Scott\" },{ \"id\":\"2\", \"name\":\"Claus\" }]").endRest().get("/users/{id}")
+                    .route().transform().simple("{ \"id\":\"${header.id}\", \"name\":\"Scott\" }").endRest().post("/users").to("mock:create").put("/users/{id}").to("mock:update")
                     .delete("/users/{id}").to("mock:delete");
             }
         };


[camel] 03/03: CAMEL-14346 - Regen

Posted by ac...@apache.org.
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

commit 550cada29f3aebaea234fc08482cc739030292f8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jan 2 09:46:53 2020 +0100

    CAMEL-14346 - Regen
---
 docs/components/modules/ROOT/pages/coap-component.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/components/modules/ROOT/pages/coap-component.adoc b/docs/components/modules/ROOT/pages/coap-component.adoc
index 11fa506..d51c29c 100644
--- a/docs/components/modules/ROOT/pages/coap-component.adoc
+++ b/docs/components/modules/ROOT/pages/coap-component.adoc
@@ -82,7 +82,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (15 parameters):
+=== Query Parameters (16 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -94,6 +94,7 @@ with the following path and query parameters:
 | *privateKey* (common) | Set the configured private key for use with Raw Public Key. |  | PrivateKey
 | *pskStore* (common) | Set the PskStore to use for pre-shared key. |  | PskStore
 | *publicKey* (common) | Set the configured public key for use with Raw Public Key. |  | PublicKey
+| *recommendedCipherSuitesOnly* (common) | The CBC cipher suites are not recommended. If you want to use them, you first need to set the recommendedCipherSuitesOnly option to false. | true | boolean
 | *sslContextParameters* (common) | Set the SSLContextParameters object for setting up TLS. This is required for coapstcp, and for coaps when we are using certificates for TLS (as opposed to RPK or PKS). |  | SSLContextParameters
 | *trustedRpkStore* (common) | Set the TrustedRpkStore to use to determine trust in raw public keys. |  | TrustedRpkStore
 | *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