cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1555159 - /cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java
Date Fri, 03 Jan 2014 17:18:39 GMT
Author: dkulp
Date: Fri Jan  3 17:18:39 2014
New Revision: 1555159

URL: http://svn.apache.org/r1555159
Log:
Use ConcurrentHashMap as parent to make sure setting properties on the services/endpoints
at the same time messages are processed won't result in exceptions

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java?rev=1555159&r1=1555158&r2=1555159&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java
(original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/AbstractAttributedInterceptorProvider.java
Fri Jan  3 17:18:39 2014
@@ -19,13 +19,13 @@
 
 package org.apache.cxf.interceptor;
 
-import java.util.HashMap;
 import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.cxf.common.util.ModCountCopyOnWriteArrayList;
 import org.apache.cxf.message.Message;
 
-public abstract class AbstractAttributedInterceptorProvider extends HashMap<String, Object>
+public abstract class AbstractAttributedInterceptorProvider extends ConcurrentHashMap<String,
Object>
     implements InterceptorProvider {
 
     private static final long serialVersionUID = -1915876045710441978L;
@@ -39,6 +39,13 @@ public abstract class AbstractAttributed
         = new ModCountCopyOnWriteArrayList<Interceptor<? extends Message>>();
 
     
+    public Object put(String s, Object o) {
+        if (o == null) {
+            return super.remove(s);
+        }
+        return super.put(s, o);
+    }
+    
     public List<Interceptor<? extends Message>> getOutFaultInterceptors() {
         return outFault;
     }



Mime
View raw message