You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by vi...@apache.org on 2014/09/03 12:43:48 UTC

svn commit: r1622215 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ApplicationContextFacade.java webapps/docs/changelog.xml

Author: violetagg
Date: Wed Sep  3 10:43:48 2014
New Revision: 1622215

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

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1618169

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java?rev=1622215&r1=1622214&r2=1622215&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java Wed Sep  3 10:43:48 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;
@@ -62,15 +63,15 @@ public class ApplicationContextFacade im
     /**
      * Cache Class object used for reflection.
      */
-    private HashMap<String,Class<?>[]> classCache;
-    
-    
+    private final Map<String,Class<?>[]> classCache;
+
+
     /**
      * Cache method object.
      */
-    private HashMap<String,Method> objectCache;
-    
-    
+    private final Map<String,Method> objectCache;
+
+
     // ----------------------------------------------------------- Constructors
 
 
@@ -83,9 +84,9 @@ public class ApplicationContextFacade im
     public ApplicationContextFacade(ApplicationContext context) {
         super();
         this.context = context;
-        
+
         classCache = new HashMap<String,Class<?>[]>();
-        objectCache = new HashMap<String,Method>();
+        objectCache = new ConcurrentHashMap<String,Method>();
         initClassCache();
     }
     

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1622215&r1=1622214&r2=1622215&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep  3 10:43:48 2014
@@ -98,6 +98,10 @@
         <bug>56825</bug>: Enable pre-emptive authentication to work with the
         SSL authenticator. Based on a patch by jlmonteiro. (markt)
       </fix>
+      <fix>
+        <bug>56857</bug>: Fix thread safety issue when calling ServletContext
+        methods while running under a security manager. (markt)
+      </fix>
       <scode>
         <bug>56882</bug>: Add testcase for processing of forwards and includes
         when Context have been reloaded. (kkolinko)



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