db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r500142 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java
Date Fri, 26 Jan 2007 04:34:44 GMT
Author: djd
Date: Thu Jan 25 20:34:44 2007
New Revision: 500142

URL: http://svn.apache.org/viewvc?view=rev&rev=500142
Log:
Fix DropDatabaseSetup to work even if the database was never created.
Previously an assert would fail if the database did not exist at tearDown time.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java?view=diff&rev=500142&r1=500141&r2=500142
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DropDatabaseSetup.java
Thu Jan 25 20:34:44 2007
@@ -76,6 +76,11 @@
     }
 
     private static void removeDir(File dir) {
+        
+        // Check if anything to do!
+        // Database may not have been created.
+        if (!dir.exists())
+            return;
 
         String[] list = dir.list();
 



Mime
View raw message