camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] camel git commit: Fixed CS. This closes #1080
Date Mon, 25 Jul 2016 15:16:45 GMT
Fixed CS. This closes #1080


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

Branch: refs/heads/master
Commit: d50dcd4d7ed89503ed47516a675288a0d98eddfb
Parents: 34f9af9
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jul 25 17:15:42 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jul 25 17:15:42 2016 +0200

----------------------------------------------------------------------
 .../component/restlet/DefaultRestletBinding.java | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d50dcd4d/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 31eb55e..be75a8e 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -195,23 +195,22 @@ public class DefaultRestletBinding implements RestletBinding, HeaderFilterStrate
             }
         }
 
-        //Get outgoing custom http headers from the exchange if they exists
-        Series<Header> restletHeaders = exchange.getIn().getHeader(HeaderConstants.ATTRIBUTE_HEADERS,Series.class);
+        // get outgoing custom http headers from the exchange if they exists
+        Series<Header> restletHeaders = exchange.getIn().getHeader(HeaderConstants.ATTRIBUTE_HEADERS,
Series.class);
         if (restletHeaders == null) {
-            restletHeaders = new Series<>(Header.class);
+            restletHeaders = new Series<Header>(Header.class);
             request.getAttributes().put(HeaderConstants.ATTRIBUTE_HEADERS, restletHeaders);
         } else {
-            
-            //If the restlet headers already exists on the exchange, we need to filter them
-            for(String name : restletHeaders.getNames()){
-                if(headerFilterStrategy.applyFilterToCamelHeaders(name, restletHeaders.getValues(name),
exchange)) {
+            // if the restlet headers already exists on the exchange, we need to filter them
+            for (String name : restletHeaders.getNames()) {
+                if (headerFilterStrategy.applyFilterToCamelHeaders(name, restletHeaders.getValues(name),
exchange)) {
                     restletHeaders.removeAll(name);
                 }
             }
             request.getAttributes().put(HeaderConstants.ATTRIBUTE_HEADERS, restletHeaders);
-            
-            //Since the restlet headers already exists remove them from the exchange so they
don't get added again below
-            //We will get a new set of restlet headers on the response
+
+            // since the restlet headers already exists remove them from the exchange so
they don't get added again below
+            // we will get a new set of restlet headers on the response
             exchange.getIn().removeHeader(HeaderConstants.ATTRIBUTE_HEADERS);
         }
 


Mime
View raw message