java.io.Filejava.nio.file.Path



Project apache/lucene-solr in file ...test.org.apache.lucene.index.TestCompoundFile.java (2014-09-13)
@@ -30,8 +30,8 @@ import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
 
-import java.io.File;
 import java.io.IOException;
+import java.nio.file.Path;
 
 import static org.apache.lucene.store.TestHelper.isSimpleFSIndexInput;
 import static org.apache.lucene.store.TestHelper.isSimpleFSIndexInputOpen;
@@ -43,7 +43,7 @@ public class TestCompoundFile extends LuceneTestCase
     @Override
     public void setUp() throws Exception {
        super.setUp();
-       File file = createTempDir("testIndex");
+       Path file = createTempDir("testIndex");
        // use a simple FSDir here, to be sure to have SimpleFSInputs
        dir = new SimpleFSDirectory(file,null);
     }
Project apache/lucene-solr in file ...ache.lucene.index.TestCrashCausesCorruptIndex.java (2014-09-13)
@@ -17,8 +17,8 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
+import java.nio.file.Path;
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
@@ -35,7 +35,7 @@ import org.apache.lucene.util.LuceneTestCase;
 
 public class TestCrashCausesCorruptIndex extends LuceneTestCase  {
 
-  File path;
+  Path path;
     
   /**
    * LUCENE-3627: This test fails.
Project apache/lucene-solr in file ....test.org.apache.lucene.index.TestNeverDelete.java (2014-09-13)
@@ -17,7 +17,7 @@ package org.apache.lucene.index;
  * limitations under the License.
  */
 
-import java.io.File;
+import java.nio.file.Path;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -36,7 +36,7 @@ import org.apache.lucene.util.TestUtil;
 public class TestNeverDelete extends LuceneTestCase {
 
   public void testIndexing() throws Exception {
-    final File tmpDir = createTempDir("TestNeverDelete");
+    final Path tmpDir = createTempDir("TestNeverDelete");
     final BaseDirectoryWrapper d = newFSDirectory(tmpDir);
 
     // We want to "see" files removed if Lucene removed
Project apache/lucene-solr in file ...est.org.apache.lucene.store.TestMmapDirectory.java (2014-09-13)
@@ -17,8 +17,8 @@ package org.apache.lucene.store;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
+import java.nio.file.Path;
 
 /**
  * Tests MMapDirectory
@@ -26,7 +26,7 @@ import java.io.IOException;
 public class TestMmapDirectory extends BaseDirectoryTestCase {
 
   @Override
-  protected Directory getDirectory(File path) throws IOException {
+  protected Directory getDirectory(Path path) throws IOException {
     return new MMapDirectory(path);
   }
 }
Project apache/lucene-solr in file ...st.org.apache.lucene.store.TestNIOFSDirectory.java (2014-09-13)
@@ -17,8 +17,8 @@ package org.apache.lucene.store;
  * limitations under the License.
  */
 
-import java.io.File;
 import java.io.IOException;
+import java.nio.file.Path;
 
 /**
  * Tests NIOFSDirectory
@@ -26,7 +26,7 @@ import java.io.IOException;
 public class TestNIOFSDirectory extends BaseDirectoryTestCase {
 
   @Override
-  protected Directory getDirectory(File path) throws IOException {
+  protected Directory getDirectory(Path path) throws IOException {
     return new NIOFSDirectory(path);
   }
 }