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 2016/05/10 08:49:37 UTC

svn commit: r1743130 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/ContainerBase.java webapps/docs/changelog.xml

Author: markt
Date: Tue May 10 08:49:36 2016
New Revision: 1743130

URL: http://svn.apache.org/viewvc?rev=1743130&view=rev
Log:
Ensure that the process to remove a child container is the reverse of the process to add one.
Patch provided by Huxing Zhang.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1743130&r1=1743129&r2=1743130&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java Tue May 10 08:49:36 2016
@@ -927,12 +927,6 @@ public abstract class ContainerBase
             return;
         }
 
-        synchronized(children) {
-            if (children.get(child.getName()) == null)
-                return;
-            children.remove(child.getName());
-        }
-
         if (started && (child instanceof Lifecycle)) {
             try {
                 if( child instanceof ContainerBase ) {
@@ -947,6 +941,12 @@ public abstract class ContainerBase
             }
         }
 
+        synchronized(children) {
+            if (children.get(child.getName()) == null)
+                return;
+            children.remove(child.getName());
+        }
+
         fireContainerEvent(REMOVE_CHILD_EVENT, child);
 
         // child.setParent(null);

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1743130&r1=1743129&r2=1743130&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue May 10 08:49:36 2016
@@ -81,6 +81,11 @@
         custom responses to <code>HEAD</code> requests that do not set a
         <code>Content-Length</code> value. (markt)
       </fix>
+      <fix>
+        <bug>59449</bug>: In <code>ContainerBase</code>, ensure that the process
+        to remove a child container is the reverse of the process to add one.
+        Patch provided by Huxing Zhang. (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