You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/08/15 14:54:37 UTC

svn commit: r1618169 - in /tomcat/trunk: java/org/apache/catalina/core/ApplicationContextFacade.java webapps/docs/changelog.xml

Author: markt
Date: Fri Aug 15 12:54:37 2014
New Revision: 1618169

URL: http://svn.apache.org/r1618169
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56857
Fix thread safety issue when calling ServletContext methods while running under a security manager.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java?rev=1618169&r1=1618168&r2=1618169&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java Fri Aug 15 12:54:37 2014
@@ -32,6 +32,7 @@ import java.util.EventListener;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterRegistration;
@@ -61,13 +62,13 @@ public class ApplicationContextFacade im
     /**
      * Cache Class object used for reflection.
      */
-    private final HashMap<String,Class<?>[]> classCache;
+    private final Map<String,Class<?>[]> classCache;
 
 
     /**
      * Cache method object.
      */
-    private final HashMap<String,Method> objectCache;
+    private final Map<String,Method> objectCache;
 
 
     // ----------------------------------------------------------- Constructors
@@ -84,7 +85,7 @@ public class ApplicationContextFacade im
         this.context = context;
 
         classCache = new HashMap<>();
-        objectCache = new HashMap<>();
+        objectCache = new ConcurrentHashMap<>();
         initClassCache();
     }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1618169&r1=1618168&r2=1618169&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Aug 15 12:54:37 2014
@@ -145,6 +145,10 @@
         <bug>56848</bug>: Improve handling of <code>accept-language</code>
         headers. (markt)
       </fix>
+      <fix>
+        <bug>56857</bug>: Fix thread safety issue when calling ServletContext
+        methods while running under a security manager. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org