commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r564716 - /commons/proper/el/trunk/src/java/org/apache/commons/el/ExpressionEvaluatorImpl.java
Date Fri, 10 Aug 2007 18:47:35 GMT
Author: mbenson
Date: Fri Aug 10 11:47:32 2007
New Revision: 564716

URL: http://svn.apache.org/viewvc?view=rev&rev=564716
Log:
[EL-5] remove synchronization on cache tables to alleviate performance issues in high-contention
scenarios

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=564716&r1=564715&r2=564716
==============================================================================
--- 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 Fri
Aug 10 11:47:32 2007
@@ -19,7 +19,6 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.text.MessageFormat;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -89,8 +88,7 @@
     // -------------------------------------
     /** The mapping from expression String to its parsed form (String,
         Expression, or ExpressionString) */
-    static Map sCachedExpressionStrings = Collections
-            .synchronizedMap(new HashMap());
+    static Map sCachedExpressionStrings = new HashMap();
 
     /** The mapping from ExpectedType to Maps mapping literal String to
         parsed value */
@@ -309,7 +307,7 @@
         synchronized (sCachedExpectedTypes) {
             Map ret = (Map) sCachedExpectedTypes.get(pExpectedType);
             if (ret == null) {
-                ret = Collections.synchronizedMap(new HashMap());
+                ret = new HashMap();
                 sCachedExpectedTypes.put(pExpectedType, ret);
             }
             return ret;



Mime
View raw message