cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardPipeline.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardPipeline.java

Bill Barker-5
billbarker    2005/05/08 15:16:47

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardPipeline.java
  Log:
  Fix problem where the "first" Valve wasn't removed from the Pipeline.
 
  Of course, this can only happen when running Tomcat as Embedded, or with advanced JMX management scenarios.
 
  Fix for Bug #34546
  Reported By:   Christian Betz <[hidden email]>
 
  Revision  Changes    Path
  1.23      +7 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardPipeline.java
 
  Index: StandardPipeline.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardPipeline.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardPipeline.java 23 Jun 2004 16:59:41 -0000 1.22
  +++ StandardPipeline.java 8 May 2005 22:16:47 -0000 1.23
  @@ -515,7 +515,13 @@
        */
       public void removeValve(Valve valve) {
   
  -        Valve current = first;
  +        Valve current;
  +        if(first == valve) {
  +            first = first.getNext();
  +            current = null;
  +        } else {
  +            current = first;
  +        }
           while (current != null) {
               if (current.getNext() == valve) {
                   current.setNext(valve.getNext());
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]