commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r564929 - /commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java
Date Sat, 11 Aug 2007 15:18:36 GMT
Author: mbenson
Date: Sat Aug 11 08:18:35 2007
New Revision: 564929

URL: http://svn.apache.org/viewvc?view=rev&rev=564929
Log:
revert

Modified:
    commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java

Modified: commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java?view=diff&rev=564929&r1=564928&r2=564929
==============================================================================
--- commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java (original)
+++ commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java Sat
Aug 11 08:18:35 2007
@@ -19,6 +19,7 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.text.MessageFormat;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -88,7 +89,8 @@
     // -------------------------------------
     /** The mapping from expression String to its parsed form (String,
         Expression, or ExpressionString) */
-    static Map sCachedExpressionStrings = new HashMap();
+    static Map sCachedExpressionStrings = Collections
+            .synchronizedMap(new HashMap());
 
     /** The mapping from ExpectedType to Maps mapping literal String to
         parsed value */
@@ -307,7 +309,7 @@
         synchronized (sCachedExpectedTypes) {
             Map ret = (Map) sCachedExpectedTypes.get(pExpectedType);
             if (ret == null) {
-                ret = new HashMap();
+                ret = Collections.synchronizedMap(new HashMap());
                 sCachedExpectedTypes.put(pExpectedType, ret);
             }
             return ret;



Mime
View raw message