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 2016/07/25 13:00:51 UTC

[1/2] camel git commit: Fixed CS

Repository: camel
Updated Branches:
  refs/heads/master 91a7a02db -> 2d3c36a21


Fixed CS


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

Branch: refs/heads/master
Commit: 2d3c36a21391f79371db4392718da25b333f4da0
Parents: e075822
Author: Andrea Cosentino <an...@gmail.com>
Authored: Mon Jul 25 14:15:11 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Mon Jul 25 14:33:33 2016 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/undertow/UndertowComponent.java   | 2 +-
 .../org/apache/camel/component/undertow/UndertowEndpoint.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2d3c36a2/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
index a7fac90..912856f 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
@@ -81,7 +81,7 @@ public class UndertowComponent extends UriEndpointComponent implements RestConsu
         // Prefer endpoint configured over component configured
         if (undertowHttpBinding == null) {
             // fallback to component configured
-        	undertowHttpBinding = getUndertowHttpBinding();
+            undertowHttpBinding = getUndertowHttpBinding();
         }
         if (undertowHttpBinding != null) {
             endpoint.setUndertowHttpBinding(undertowHttpBinding);

http://git-wip-us.apache.org/repos/asf/camel/blob/2d3c36a2/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
index b4dfcaf..b808b67 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
@@ -219,8 +219,8 @@ public class UndertowEndpoint extends DefaultEndpoint implements AsyncEndpoint,
     public UndertowHttpBinding getUndertowHttpBinding() {
         if (undertowHttpBinding == null) {
             // create a new binding and use the options from this endpoint
-        	undertowHttpBinding = new DefaultUndertowHttpBinding();
-        	undertowHttpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy());
+            undertowHttpBinding = new DefaultUndertowHttpBinding();
+            undertowHttpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy());
         }
         return undertowHttpBinding;
     }


[2/2] camel git commit: CAMEL-10181: Camel-undertow: UndertowHttpBinding should be initialized in the endpoint and not at component level

Posted by ac...@apache.org.
CAMEL-10181: Camel-undertow: UndertowHttpBinding should be initialized in the endpoint and not at component level


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

Branch: refs/heads/master
Commit: e07582215f682f56c85114819606014af08bf7b6
Parents: 91a7a02
Author: Andrea Cosentino <an...@gmail.com>
Authored: Mon Jul 25 14:10:35 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Mon Jul 25 14:33:33 2016 +0200

----------------------------------------------------------------------
 components/camel-undertow/src/main/docs/undertow.adoc    |  4 ++++
 .../camel/component/undertow/UndertowComponent.java      | 11 +++++++++--
 .../camel/component/undertow/UndertowEndpoint.java       |  8 ++++++--
 3 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e0758221/components/camel-undertow/src/main/docs/undertow.adoc
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/docs/undertow.adoc b/components/camel-undertow/src/main/docs/undertow.adoc
index 275b5ad..b82a5c4 100644
--- a/components/camel-undertow/src/main/docs/undertow.adoc
+++ b/components/camel-undertow/src/main/docs/undertow.adoc
@@ -40,6 +40,8 @@ Options
 ^^^^^^^
 
 
+
+
 // component options: START
 The Undertow component supports 2 options which are listed below.
 
@@ -57,6 +59,8 @@ The Undertow component supports 2 options which are listed below.
 
 
 
+
+
 // endpoint options: START
 The Undertow component supports 17 endpoint options which are listed below:
 

http://git-wip-us.apache.org/repos/asf/camel/blob/e0758221/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
index f9677f6..a7fac90 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
@@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory;
 public class UndertowComponent extends UriEndpointComponent implements RestConsumerFactory, RestApiConsumerFactory {
     private static final Logger LOG = LoggerFactory.getLogger(UndertowEndpoint.class);
 
-    private UndertowHttpBinding undertowHttpBinding = new DefaultUndertowHttpBinding();
+    private UndertowHttpBinding undertowHttpBinding;
     private final Map<Integer, UndertowRegistry> serversRegistry = new HashMap<Integer, UndertowRegistry>();
     private SSLContextParameters sslContextParameters;
 
@@ -78,7 +78,14 @@ public class UndertowComponent extends UriEndpointComponent implements RestConsu
         UndertowEndpoint endpoint = createEndpointInstance(endpointUri, this);
         // set options from component
         endpoint.setSslContextParameters(sslContextParameters);
-        endpoint.setUndertowHttpBinding(undertowHttpBinding);
+        // Prefer endpoint configured over component configured
+        if (undertowHttpBinding == null) {
+            // fallback to component configured
+        	undertowHttpBinding = getUndertowHttpBinding();
+        }
+        if (undertowHttpBinding != null) {
+            endpoint.setUndertowHttpBinding(undertowHttpBinding);
+        }
         // set options from parameters
         setProperties(endpoint, parameters);
         if (options != null) {

http://git-wip-us.apache.org/repos/asf/camel/blob/e0758221/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
index ce71dea..b4dfcaf 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
@@ -61,7 +61,7 @@ public class UndertowEndpoint extends DefaultEndpoint implements AsyncEndpoint,
     @UriParam(label = "advanced")
     private UndertowHttpBinding undertowHttpBinding;
     @UriParam(label = "advanced")
-    private HeaderFilterStrategy headerFilterStrategy;
+    private HeaderFilterStrategy headerFilterStrategy = new UndertowHeaderFilterStrategy();
     @UriParam(label = "security")
     private SSLContextParameters sslContextParameters;
     @UriParam(label = "consumer")
@@ -179,7 +179,6 @@ public class UndertowEndpoint extends DefaultEndpoint implements AsyncEndpoint,
      */
     public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy) {
         this.headerFilterStrategy = headerFilterStrategy;
-        undertowHttpBinding.setHeaderFilterStrategy(headerFilterStrategy);
     }
 
     public SSLContextParameters getSslContextParameters() {
@@ -218,6 +217,11 @@ public class UndertowEndpoint extends DefaultEndpoint implements AsyncEndpoint,
     }
 
     public UndertowHttpBinding getUndertowHttpBinding() {
+        if (undertowHttpBinding == null) {
+            // create a new binding and use the options from this endpoint
+        	undertowHttpBinding = new DefaultUndertowHttpBinding();
+        	undertowHttpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy());
+        }
         return undertowHttpBinding;
     }