tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r683982 - /tomcat/trunk/java/org/apache/jk/server/JkMain.java
Date Fri, 08 Aug 2008 14:31:21 GMT
Author: markt
Date: Fri Aug  8 07:31:20 2008
New Revision: 683982

URL: http://svn.apache.org/viewvc?rev=683982&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45591 - NPE on start-up failure in
some cases

Modified:
    tomcat/trunk/java/org/apache/jk/server/JkMain.java

Modified: tomcat/trunk/java/org/apache/jk/server/JkMain.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jk/server/JkMain.java?rev=683982&r1=683981&r2=683982&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jk/server/JkMain.java (original)
+++ tomcat/trunk/java/org/apache/jk/server/JkMain.java Fri Aug  8 07:31:20 2008
@@ -676,9 +676,12 @@
     }
 
     public void pause() throws Exception {
-        for( int i=0; i<wEnv.getHandlerCount(); i++ ) {
-            if( wEnv.getHandler(i) != null ) {
-                wEnv.getHandler(i).pause();
+        // wEnv sometime null at shutdown - bug45591
+        if (wEnv != null) {
+            for( int i=0; i<wEnv.getHandlerCount(); i++ ) {
+                if( wEnv.getHandler(i) != null ) {
+                    wEnv.getHandler(i).pause();
+                }
             }
         }
     }



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


Mime
View raw message