Skip to content

Commit

Permalink
Review of Map / ConcurrentMap / ConcurrentHashMap
Browse files Browse the repository at this point in the history
Declare that functions must be thread-safe

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1741221 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Apr 27, 2016
1 parent 321ebb0 commit cb819ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions java/org/apache/el/lang/FunctionMapperImpl.java
Expand Up @@ -21,8 +21,8 @@
import java.io.ObjectInput; import java.io.ObjectInput;
import java.io.ObjectOutput; import java.io.ObjectOutput;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;


import javax.el.FunctionMapper; import javax.el.FunctionMapper;


Expand All @@ -37,7 +37,7 @@ public class FunctionMapperImpl extends FunctionMapper implements


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


protected Map<String, Function> functions = new ConcurrentHashMap<>(); protected ConcurrentMap<String, Function> functions = new ConcurrentHashMap<>();


/* /*
* (non-Javadoc) * (non-Javadoc)
Expand Down Expand Up @@ -84,7 +84,7 @@ public void writeExternal(ObjectOutput out) throws IOException {
@Override @Override
public void readExternal(ObjectInput in) throws IOException, public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException { ClassNotFoundException {
this.functions = (Map<String, Function>) in.readObject(); this.functions = (ConcurrentMap<String, Function>) in.readObject();
} }


public static class Function implements Externalizable { public static class Function implements Externalizable {
Expand Down

0 comments on commit cb819ef

Please sign in to comment.