incubator-ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r823556 - /incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java
Date Fri, 09 Oct 2009 14:04:09 GMT
Author: marrs
Date: Fri Oct  9 14:04:09 2009
New Revision: 823556

URL: http://svn.apache.org/viewvc?rev=823556&view=rev
Log:
Deletes a file before renaming some other file to an existing file to fix test failure on
Windows systems.

Modified:
    incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java

Modified: incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java?rev=823556&r1=823555&r2=823556&view=diff
==============================================================================
--- incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java (original)
+++ incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java Fri Oct
 9 14:04:09 2009
@@ -101,12 +101,20 @@
         }
         if (outFile != null) {
             if (factoryPid == null) {
-                outFile.renameTo(new File(m_configDir, servicePid+".cfg"));
+                File dest = new File(m_configDir, servicePid + ".cfg");
+                if (dest.exists()) {
+                    dest.delete();
+                }
+                outFile.renameTo(dest);
             }
             else {
                 File file = new File(m_configDir, factoryPid);
                 file.mkdirs();
-                outFile.renameTo(new File(file, servicePid+".cfg"));
+                File dest = new File(file, servicePid + ".cfg");
+                if (dest.exists()) {
+                    dest.delete();
+                }
+                outFile.renameTo(dest);
             }
         }
     }



Mime
View raw message