cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/servlet ParanoidCocoonServlet.java
Date Thu, 07 Aug 2003 06:26:24 GMT
cziegeler    2003/08/06 23:26:24

  Modified:    src/java/org/apache/cocoon/servlet
                        ParanoidCocoonServlet.java
  Log:
  Check for proper init
  
  Revision  Changes    Path
  1.8       +9 -7      cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
  
  Index: ParanoidCocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ParanoidCocoonServlet.java	7 Aug 2003 05:57:17 -0000	1.7
  +++ ParanoidCocoonServlet.java	7 Aug 2003 06:26:24 -0000	1.8
  @@ -263,12 +263,14 @@
   	 */
   	public void destroy() {
   
  -        final ClassLoader old = Thread.currentThread().getContextClassLoader();
  -        try {
  -            Thread.currentThread().setContextClassLoader(this.classloader);
  -            this.servlet.destroy();
  -        } finally {
  -            Thread.currentThread().setContextClassLoader(old);    
  +        if ( this.servlet != null ) {
  +            final ClassLoader old = Thread.currentThread().getContextClassLoader();
  +            try {
  +                Thread.currentThread().setContextClassLoader(this.classloader);
  +                this.servlet.destroy();
  +            } finally {
  +                Thread.currentThread().setContextClassLoader(old);    
  +            }
           }
   
   		super.destroy();
  
  
  

Mime
View raw message