You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/02/01 20:17:34 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup HostConfig.java

remm        02/02/01 11:17:34

  Modified:    catalina/src/share/org/apache/catalina/startup
                        HostConfig.java
  Log:
  - Fix NPE in the auto deployer, which can kill the auto deploy thread, and which
    can happen with a context with a bad configuration (especially, a bad docBase).
  
  Revision  Changes    Path
  1.16      +9 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java
  
  Index: HostConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HostConfig.java	3 Dec 2001 22:19:42 -0000	1.15
  +++ HostConfig.java	1 Feb 2002 19:17:34 -0000	1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v 1.15 2001/12/03 22:19:42 remm Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/12/03 22:19:42 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v 1.16 2002/02/01 19:17:34 remm Exp $
  + * $Revision: 1.16 $
  + * $Date: 2002/02/01 19:17:34 $
    *
    * ====================================================================
    *
  @@ -101,7 +101,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.15 $ $Date: 2001/12/03 22:19:42 $
  + * @version $Revision: 1.16 $ $Date: 2002/02/01 19:17:34 $
    */
   
   public class HostConfig
  @@ -479,6 +479,11 @@
   
               try {
                   DirContext resources = context.getResources();
  +                if (resources == null) {
  +                    // This can happen if there was an error initializing
  +                    // the context
  +                    continue;
  +                }
                   ResourceAttributes webXmlAttributes = 
                       (ResourceAttributes) 
                       resources.getAttributes("/WEB-INF/web.xml");
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>