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);
+            }
         }
     }
 


Reply via email to