svn commit: r1799172 - /tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1799172 - /tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java

Violeta Georgieva
Author: violetagg
Date: Mon Jun 19 10:04:48 2017
New Revision: 1799172

URL: http://svn.apache.org/viewvc?rev=1799172&view=rev
Log:
Fix the build - java.nio.file is not available in Java 6

Modified:
    tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java

Modified: tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java?rev=1799172&r1=1799171&r2=1799172&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/juli/TestFileHandler.java Mon Jun 19 10:04:48 2017
@@ -19,9 +19,6 @@ package org.apache.juli;
 
 import java.io.File;
 import java.io.IOException;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Path;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 
@@ -46,11 +43,10 @@ public class TestFileHandler {
     @Before
     public void setUp() throws Exception {
         File logsBase = new File(System.getProperty("tomcat.test.temp", "output/tmp"));
-        if (!logsBase.mkdirs() && !logsBase.isDirectory()) {
+        logsDir = new File(logsBase, "test-" + System.currentTimeMillis());
+        if (!logsDir.mkdirs() && !logsDir.isDirectory()) {
             fail("Unable to create logs directory.");
         }
-        Path logsBasePath = FileSystems.getDefault().getPath(logsBase.getAbsolutePath());
-        logsDir = Files.createTempDirectory(logsBasePath, "test").toFile();
 
         generateLogFiles(logsDir, PREFIX_1, SUFIX_2, 3);
         generateLogFiles(logsDir, PREFIX_2, SUFIX_1, 3);



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]