cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/5] cxf git commit: CXF-6346 Fixed the test errors of FailoverTest in systest/jaxrs in JDK1.8
Date Mon, 13 Apr 2015 03:24:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes e21501b29 -> c26f841ae


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/1368e8f3
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1368e8f3
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1368e8f3

Branch: refs/heads/3.0.x-fixes
Commit: 1368e8f332ecc6ef984d4ab6eafbae46bab7f3be
Parents: e21501b
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Mon Apr 13 10:58:41 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Mon Apr 13 11:11:06 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/1368e8f3/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);


Mime
View raw message