tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r960104 - /tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
Date Fri, 02 Jul 2010 21:13:25 GMT
Author: markt
Date: Fri Jul  2 21:13:25 2010
New Revision: 960104

URL: http://svn.apache.org/viewvc?rev=960104&view=rev
Log:
A few more FindBugs issues

Modified:
    tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java

Modified: tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=960104&r1=960103&r2=960104&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java (original)
+++ tomcat/trunk/test/org/apache/catalina/mbeans/TestRegistration.java Fri Jul  2 21:13:25
2010
@@ -46,7 +46,10 @@ public class TestRegistration extends To
 
         final Tomcat tomcat = getTomcatInstance();
         final File contextDir = new File(getTemporaryDirectory(), "webappFoo");
-        contextDir.mkdir();
+        if (!contextDir.exists()) {
+            if (!contextDir.mkdir())
+                fail("Failed to create: [" + contextDir.toString() + "]");
+        }
         tomcat.addContext("/foo", contextDir.getAbsolutePath());
         tomcat.start();
         
@@ -70,7 +73,10 @@ public class TestRegistration extends To
         tomcat.getEngine().addChild(host);
 
         final File contextDir2 = new File(getTemporaryDirectory(), "webappFoo2");
-        contextDir2.mkdir();
+        if (!contextDir2.exists()) {
+            if (!contextDir2.mkdir())
+                fail("Failed to create: [" + contextDir2.toString() + "]");
+        }
         tomcat.addContext(host, "/foo2", contextDir2.getAbsolutePath());
         
         tomcat.start();



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


Mime
View raw message