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 2018/12/21 15:29:58 UTC

[camel] branch camel-2.x updated (62e6700 -> dc8436f)

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

davsclaus pushed a change to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 62e6700  CAMEL-13006: Fix for required properties in odata configuration
     new ba03f23  CAMEL-13028: camel-undertow - When using SSL with rest-dsl and api-doc then you can get a port already bound exception
     new 201097d  CAMEL-13029: camel-swagger-java - Should default use scheme from rest-dsl configuration in swagger doc
     new dc8436f  Fixed CS

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:
 .../apache/camel/swagger/SwaggerRestApiProcessorFactory.java   |  8 ++++++++
 .../org/apache/camel/component/undertow/UndertowHostKey.java   | 10 ++++------
 2 files changed, 12 insertions(+), 6 deletions(-)


[camel] 03/03: Fixed CS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit dc8436f31b6a32dd986fed6068005de7fe987b1c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Dec 21 16:25:27 2018 +0100

    Fixed CS
---
 .../java/org/apache/camel/component/undertow/UndertowHostKey.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java
index 8f09a18..beb580d 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.


[camel] 01/03: CAMEL-13028: camel-undertow - When using SSL with rest-dsl and api-doc then you can get a port already bound exception

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ba03f2320f002182a3b013cd76ea358c8d96e68e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Dec 21 16:03:07 2018 +0100

    CAMEL-13028: camel-undertow - When using SSL with rest-dsl and api-doc then you can get a port already bound exception
---
 .../apache/camel/component/undertow/UndertowHostKey.java | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java
index be64d09..8f09a18 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowHostKey.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,6 +24,8 @@ import javax.net.ssl.SSLContext;
 public final class UndertowHostKey {
     private final String host;
     private final int port;
+
+    // SSLContext should not be part of the equals/hashCode contract
     private final SSLContext sslContext;
 
     public UndertowHostKey(String host, int port, SSLContext ssl) {
@@ -49,12 +51,8 @@ public final class UndertowHostKey {
         if (!(target instanceof UndertowHostKey)) {
             return false;
         }
-        UndertowHostKey targetKey = (UndertowHostKey)target;
+        UndertowHostKey targetKey = (UndertowHostKey) target;
         boolean answer = true;
-        if (this.sslContext != null || targetKey.sslContext != null) {
-            answer = this.sslContext != null && targetKey.sslContext != null
-                && this.sslContext.equals(targetKey.sslContext);
-        }
         return answer && this.host != null && targetKey.host != null
             && this.host.equals(targetKey.host) && this.port == targetKey.port;
     }
@@ -63,6 +61,6 @@ public final class UndertowHostKey {
     public int hashCode() {
         int answer = host.hashCode();
         answer = answer * 31 + Integer.hashCode(port);
-        return answer * 31 + (sslContext != null ? sslContext.hashCode() : 0);
+        return answer;
     }
 }
\ No newline at end of file


[camel] 02/03: CAMEL-13029: camel-swagger-java - Should default use scheme from rest-dsl configuration in swagger doc

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 201097da0c9436d7d0ef90fa3c93aae40b3620f0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Dec 21 16:16:28 2018 +0100

    CAMEL-13029: camel-swagger-java - Should default use scheme from rest-dsl configuration in swagger doc
---
 .../org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java
index 7d89b9a..dfdaf84 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java
@@ -56,6 +56,14 @@ public class SwaggerRestApiProcessorFactory implements RestApiProcessorFactory {
                 }
             }
         }
+        // and include the default scheme as well if not explicit configured
+        if (!options.containsKey("schemes") && !options.containsKey("schemas")) {
+            // NOTE schemas is a typo but kept for backwards compatible
+            String scheme = configuration.getScheme();
+            if (scheme != null) {
+                options.put("schemes", scheme);
+            }
+        }
         // and context path is the base.path
         String path = configuration.getContextPath();
         if (path != null) {