diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index 74da77160..fe64d8f87 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -49,6 +49,7 @@ import java.util.regex.Pattern; public class OgnlUtil { private static final Logger LOG = LogManager.getLogger(OgnlUtil.class); + private ConcurrentMap expressions = new ConcurrentHashMap<>(); private final ConcurrentMap beanInfoCache = new ConcurrentHashMap<>(); private TypeConverter defaultConverter; @@ -57,9 +58,9 @@ public class OgnlUtil { private boolean enableExpressionCache = true; private boolean enableEvalExpression; - private Set> excludedClasses = new HashSet<>(); - private Set excludedPackageNamePatterns = new HashSet<>(); - private Set excludedPackageNames = new HashSet<>(); + private Set> excludedClasses = Collections.emptySet(); + private Set excludedPackageNamePatterns = Collections.emptySet(); + private Set excludedPackageNames = Collections.emptySet(); private Container container; private boolean allowStaticMethodAccess;