jdk/test/java/io/FileInputStream/LargeFileAvailable.java
changeset 8158 77d9c0f1c19f
parent 7519 1488bb354081
child 9035 1255eb81cc2f
--- a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java	Thu Jan 13 22:21:58 2011 -0800
+++ b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java	Fri Jan 28 09:28:43 2011 +0000
@@ -31,6 +31,7 @@
 import java.io.*;
 import java.nio.ByteBuffer;
 import java.nio.channels.*;
+import java.nio.file.Files;
 import static java.nio.file.StandardOpenOption.*;
 
 public class LargeFileAvailable {
@@ -85,7 +86,7 @@
         // Create a large file as a sparse file if possible
         File largefile = File.createTempFile("largefile", null);
         // re-create as a sparse file
-        largefile.toPath().delete();
+        Files.delete(largefile.toPath());
         try (FileChannel fc =
                 FileChannel.open(largefile.toPath(),
                                  CREATE_NEW, WRITE, SPARSE)) {