Repository: commons-io
Updated Branches:
  refs/heads/master 5411db017 -> 31e141019


IO-534 FileUtilTestCase.testForceDeleteDir() should not delete
testDirectory parent

Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/31e14101
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/31e14101
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/31e14101

Branch: refs/heads/master
Commit: 31e141019010d27dfb3c1a1fb712433268b520f0
Parents: 5411db0
Author: Sebb <s...@apache.org>
Authored: Sun Apr 23 16:31:58 2017 +0100
Committer: Sebb <s...@apache.org>
Committed: Sun Apr 23 16:34:45 2017 +0100

----------------------------------------------------------------------
 src/changes/changes.xml                                    | 3 +++
 src/test/java/org/apache/commons/io/FileUtilsTestCase.java | 7 +++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-io/blob/31e14101/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3994b6a..1247b0a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,9 @@ The <action> type attribute can be add,update,fix,remove.
   <body>
     <!-- The release date is the date RC is cut -->
     <release version="2.6" date="2017-MM-DD" description="New features and bug 
fixes.">
+      <action issue="IO-534" dev="sebb" type="fix">
+        FileUtilTestCase.testForceDeleteDir() should not delete testDirectory 
parent
+      </action>
       <action issue="IO-528" dev="pschumacher" type="fix" due-to="Dave Moten">
         fix Tailer.run race condition runaway logging
       </action>

http://git-wip-us.apache.org/repos/asf/commons-io/blob/31e14101/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java 
b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
index 8f29835..04dc7f0 100644
--- a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -1619,10 +1619,9 @@ public class FileUtilsTestCase extends FileBasedTestCase 
{
     @Test
     public void testForceDeleteDir() throws Exception {
         final File testDirectory = getTestDirectory();
-        FileUtils.forceDelete(testDirectory.getParentFile());
-        assertTrue(
-                "Check No Exist",
-                !testDirectory.getParentFile().exists());
+        assertTrue("TestDirectory must exist", testDirectory.exists());
+        FileUtils.forceDelete(testDirectory);
+        assertFalse("TestDirectory must not exist", testDirectory.exists());
     }
 
     /*

Reply via email to