You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2014/05/28 03:53:46 UTC

svn commit: r1597916 - /logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/CleanFiles.java

Author: ggregory
Date: Wed May 28 01:53:45 2014
New Revision: 1597916

URL: http://svn.apache.org/r1597916
Log:
Refactor out the delete() call on its own to make it more obvious that we are actually deleting a file.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/CleanFiles.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/CleanFiles.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/CleanFiles.java?rev=1597916&r1=1597915&r2=1597916&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/CleanFiles.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/junit/CleanFiles.java Wed May 28 01:53:45 2014
@@ -47,10 +47,11 @@ public class CleanFiles extends External
     private void clean() {
         for (final File file : files) {
             if (file.exists()) {
+                final boolean deleted = file.delete();
                 assertTrue(
                         "Could not delete " + file.toString() + ", last modifed "
-                                + DateFormat.getInstance().format(new Date(file.lastModified())), file.delete());
-            } 
+                                + DateFormat.getInstance().format(new Date(file.lastModified())), deleted);
+            }
         }
     }