tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r937302 - /tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java
Date Fri, 23 Apr 2010 13:59:55 GMT
Author: markt
Date: Fri Apr 23 13:59:54 2010
New Revision: 937302

URL: http://svn.apache.org/viewvc?rev=937302&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49144
Not an issue but stop FindBugs complaining
Also fix one other FindBugs report for this class.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=937302&r1=937301&r2=937302&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Fri Apr 23 13:59:54 2010
@@ -348,7 +348,7 @@ public final class Bootstrap {
         Class<?> paramTypes[] = new Class[1];
         paramTypes[0] = Boolean.TYPE;
         Object paramValues[] = new Object[1];
-        paramValues[0] = new Boolean(await);
+        paramValues[0] = Boolean.valueOf(await);
         Method method = 
             catalinaDaemon.getClass().getMethod("setAwait", paramTypes);
         method.invoke(catalinaDaemon, paramValues);
@@ -385,13 +385,15 @@ public final class Bootstrap {
     public static void main(String args[]) {
 
         if (daemon == null) {
-            daemon = new Bootstrap();
+            // Don't set daemon until init() has completed
+            Bootstrap bootstrap = new Bootstrap();
             try {
-                daemon.init();
+                bootstrap.init();
             } catch (Throwable t) {
                 t.printStackTrace();
                 return;
             }
+            daemon = bootstrap;
         }
 
         try {



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


Mime
View raw message