Repository: cxf
Updated Branches:
  refs/heads/master 577ccc51c -> 7a17ee621


CXF-6346 Fixed the test errors of FailoverTest in systest/jaxrs in JDK1.8


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

Branch: refs/heads/master
Commit: 6a58f38730a362e743973b868c20dbe5a3fb8f24
Parents: 577ccc5
Author: Willem Jiang <willem.ji...@gmail.com>
Authored: Mon Apr 13 10:58:41 2015 +0800
Committer: Willem Jiang <willem.ji...@gmail.com>
Committed: Mon Apr 13 10:58:41 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/message/ExchangeImpl.java    | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6a58f387/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java 
b/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
index 2e53fae..99c4dbf 100644
--- a/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
+++ b/core/src/main/java/org/apache/cxf/message/ExchangeImpl.java
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.message;
 
+import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.cxf.Bus;
@@ -90,6 +91,15 @@ public class ExchangeImpl extends ConcurrentHashMap<String, 
Object>  implements
         return key.cast(get(key.getName()));
     }
 
+    public void putAll(Map<? extends String, ?> m) {
+        for (Map.Entry<? extends String, ?> e : m.entrySet()) {
+            // just skip the null value to void the NPE in JDK1.8
+            if (e.getValue() != null) {
+                super.put(e.getKey(), e.getValue());
+            }
+        }
+    }
+
     public <T> void put(Class<T> key, T value) {
         if (value == null) {
             super.remove(key);

Reply via email to