camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: CAMEL-9853: Camel-CXF: Possible NPE in DefaultCXFBinding
Date Mon, 11 Apr 2016 10:18:48 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x a8afa63fc -> 30be3475a


CAMEL-9853: Camel-CXF: Possible NPE in DefaultCXFBinding


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

Branch: refs/heads/camel-2.16.x
Commit: 30be3475a88206778a16784ee124cb31c43fca99
Parents: a8afa63
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Apr 11 11:48:27 2016 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Apr 11 11:51:24 2016 +0200

----------------------------------------------------------------------
 .../camel/component/cxf/DefaultCxfBinding.java      | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/30be3475/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
index ac4af5f..13f035b 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
@@ -686,13 +686,15 @@ public class DefaultCxfBinding implements CxfBinding, HeaderFilterStrategyAware
                 continue;
             }
             
-            // things that are not filtered and not specifically copied will be put in transport
headers
-            if (entry.getValue() instanceof List) {
-                transportHeaders.put(entry.getKey(), (List<String>)entry.getValue());
-            } else {
-                List<String> listValue = new ArrayList<String>();
-                listValue.add(entry.getValue().toString());
-                transportHeaders.put(entry.getKey(), listValue);
+            if (ObjectHelper.isNotEmpty(entry.getValue())) {
+                // things that are not filtered and not specifically copied will be put in
transport headers
+                if (entry.getValue() instanceof List) {
+                    transportHeaders.put(entry.getKey(), (List<String>)entry.getValue());
+                } else {
+                    List<String> listValue = new ArrayList<String>();
+                    listValue.add(entry.getValue().toString());
+                    transportHeaders.put(entry.getKey(), listValue);
+                }
             }
             
         }


Mime
View raw message