Return-Path: Delivered-To: apmail-incubator-ace-commits-archive@minotaur.apache.org Received: (qmail 15337 invoked from network); 9 Oct 2009 14:04:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Oct 2009 14:04:33 -0000 Received: (qmail 28157 invoked by uid 500); 9 Oct 2009 14:04:33 -0000 Delivered-To: apmail-incubator-ace-commits-archive@incubator.apache.org Received: (qmail 28138 invoked by uid 500); 9 Oct 2009 14:04:33 -0000 Mailing-List: contact ace-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ace-dev@incubator.apache.org Delivered-To: mailing list ace-commits@incubator.apache.org Received: (qmail 28126 invoked by uid 99); 9 Oct 2009 14:04:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 14:04:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 14:04:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E4F3C23888E5; Fri, 9 Oct 2009 14:04:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r823556 - /incubator/ace/trunk/test/src/org/apache/ace/configurator/ConfiguratorTest.java Date: Fri, 09 Oct 2009 14:04:09 -0000 To: ace-commits@incubator.apache.org From: marrs@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091009140409.E4F3C23888E5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); } } }