jdk/test/java/nio/file/Files/StreamTest.java
changeset 18571 8e3cb3c46ae8
parent 17943 a8293d390273
child 19800 6e1fef53ea55
--- a/jdk/test/java/nio/file/Files/StreamTest.java	Thu Jun 27 19:22:51 2013 -0700
+++ b/jdk/test/java/nio/file/Files/StreamTest.java	Tue Jun 11 13:41:38 2013 -0700
@@ -43,7 +43,7 @@
 import java.nio.file.Paths;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.Arrays;
-import java.util.Comparators;
+import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Objects;
@@ -139,7 +139,7 @@
 
     public void testBasic() {
         try (CloseableStream<Path> s = Files.list(testFolder)) {
-            Object[] actual = s.sorted(Comparators.naturalOrder()).toArray();
+            Object[] actual = s.sorted(Comparator.naturalOrder()).toArray();
             assertEquals(actual, level1);
         } catch (IOException ioe) {
             fail("Unexpected IOException");
@@ -155,7 +155,7 @@
 
     public void testWalk() {
         try (CloseableStream<Path> s = Files.walk(testFolder)) {
-            Object[] actual = s.sorted(Comparators.naturalOrder()).toArray();
+            Object[] actual = s.sorted(Comparator.naturalOrder()).toArray();
             assertEquals(actual, all);
         } catch (IOException ioe) {
             fail("Unexpected IOException");
@@ -165,7 +165,7 @@
     public void testWalkOneLevel() {
         try (CloseableStream<Path> s = Files.walk(testFolder, 1)) {
             Object[] actual = s.filter(path -> ! path.equals(testFolder))
-                               .sorted(Comparators.naturalOrder())
+                               .sorted(Comparator.naturalOrder())
                                .toArray();
             assertEquals(actual, level1);
         } catch (IOException ioe) {
@@ -177,7 +177,7 @@
         // If link is not supported, the directory structure won't have link.
         // We still want to test the behavior with FOLLOW_LINKS option.
         try (CloseableStream<Path> s = Files.walk(testFolder, FileVisitOption.FOLLOW_LINKS)) {
-            Object[] actual = s.sorted(Comparators.naturalOrder()).toArray();
+            Object[] actual = s.sorted(Comparator.naturalOrder()).toArray();
             assertEquals(actual, all_folowLinks);
         } catch (IOException ioe) {
             fail("Unexpected IOException");
@@ -637,13 +637,13 @@
     public void testClosedStream() throws IOException {
         try (CloseableStream<Path> s = Files.list(testFolder)) {
             s.close();
-            Object[] actual = s.sorted(Comparators.naturalOrder()).toArray();
+            Object[] actual = s.sorted(Comparator.naturalOrder()).toArray();
             assertTrue(actual.length <= level1.length);
         }
 
         try (CloseableStream<Path> s = Files.walk(testFolder)) {
             s.close();
-            Object[] actual = s.sorted(Comparators.naturalOrder()).toArray();
+            Object[] actual = s.sorted(Comparator.naturalOrder()).toArray();
             fail("Operate on closed stream should throw IllegalStateException");
         } catch (IllegalStateException ex) {
             // expected
@@ -652,7 +652,7 @@
         try (CloseableStream<Path> s = Files.find(testFolder, Integer.MAX_VALUE,
                     (p, attr) -> true)) {
             s.close();
-            Object[] actual = s.sorted(Comparators.naturalOrder()).toArray();
+            Object[] actual = s.sorted(Comparator.naturalOrder()).toArray();
             fail("Operate on closed stream should throw IllegalStateException");
         } catch (IllegalStateException ex) {
             // expected