Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50021
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 29 Sep 2010 10:15:51 +0000 (10:15 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 29 Sep 2010 10:15:51 +0000 (10:15 +0000)
Don't reference ExceptionUtisl from Bootstrap - it won't be visible at startup.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1002562 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/startup/Bootstrap.java
webapps/docs/changelog.xml

index e47cb3f..6139375 100644 (file)
@@ -35,7 +35,6 @@ import org.apache.catalina.Globals;
 import org.apache.catalina.security.SecurityClassLoad;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
-import org.apache.tomcat.util.ExceptionUtils;
 
 
 /**
@@ -99,7 +98,7 @@ public final class Bootstrap {
             catalinaLoader = createClassLoader("server", commonLoader);
             sharedLoader = createClassLoader("shared", commonLoader);
         } catch (Throwable t) {
-            ExceptionUtils.handleThrowable(t);
+            handleThrowable(t);
             log.error("Class loader creation threw exception", t);
             System.exit(1);
         }
@@ -393,7 +392,7 @@ public final class Bootstrap {
             try {
                 bootstrap.init();
             } catch (Throwable t) {
-                ExceptionUtils.handleThrowable(t);
+                handleThrowable(t);
                 t.printStackTrace();
                 return;
             }
@@ -423,7 +422,7 @@ public final class Bootstrap {
                 log.warn("Bootstrap: command \"" + command + "\" does not exist.");
             }
         } catch (Throwable t) {
-            ExceptionUtils.handleThrowable(t);
+            handleThrowable(t);
             t.printStackTrace();
         }
 
@@ -502,4 +501,14 @@ public final class Bootstrap {
     }
 
 
+    // Copied from ExceptionUtils since that class is not visible during start
+    private static void handleThrowable(Throwable t) {
+        if (t instanceof ThreadDeath) {
+            throw (ThreadDeath) t;
+        }
+        if (t instanceof VirtualMachineError) {
+            throw (VirtualMachineError) t;
+        }
+        // All other instances of Throwable will be silently swallowed
+    }
 }
index 9260301..0616d9f 100644 (file)
         <bug>50018</bug>: Fix some minor Javadoc errors in Jasper source.
         Based on a patch by sebb. (timw)
       </fix>
+      <fix>
+        <bug>50021</bug>: Correct a regression in the fix for <bug>46844</bug>
+        that may have caused additional problems during a failure at start up.
+        (markt) 
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">