diff --git a/src/main/java/org/apache/ibatis/session/Configuration.java b/src/main/java/org/apache/ibatis/session/Configuration.java index 3c257379e8b..82f0f90b263 100644 --- a/src/main/java/org/apache/ibatis/session/Configuration.java +++ b/src/main/java/org/apache/ibatis/session/Configuration.java @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Properties; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.function.BiFunction; import org.apache.ibatis.binding.MapperRegistry; @@ -998,7 +999,7 @@ protected void checkLocallyForDiscriminatedNestedResultMaps(ResultMap rm) { } } - protected static class StrictMap extends HashMap { + protected static class StrictMap extends ConcurrentHashMap { private static final long serialVersionUID = -4950446264854982944L; private final String name; @@ -1055,6 +1056,15 @@ public V put(String key, V value) { return super.put(key, value); } + @Override + public boolean containsKey(Object key) { + if (key == null) { + return false; + } + + return super.get(key) != null; + } + @Override public V get(Object key) { V value = super.get(key);