Skip to content
Permalink
Browse files
Use ConcurrentHashMap as parent to make sure setting properties on th…
…e services/endpoints at the same time messages are processed won't result in exceptions

git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1555159 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Jan 3, 2014
1 parent 3a962e4 commit 11b4bedd47eed11662f3021f6220a6bd4aa01fa8
Showing 1 changed file with 9 additions and 2 deletions.
@@ -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 AbstractAttributedInterceptorProvider extends HashMap<Stri
= 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;
}

0 comments on commit 11b4bed

Please sign in to comment.