test/java/util/stream/test/org/openjdk/tests/java/util/stream/SequentialOpTest.java

Print this page
rev 7485 : 8009736: Comparator API cleanup
Reviewed-by:
Contributed-by: henry.jen@oracle.com

@@ -20,11 +20,10 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 package org.openjdk.tests.java.util.stream;
 
-import java.util.Comparators;
 import java.util.stream.LambdaTestHelpers;
 import java.util.stream.OpTestCase;
 import java.util.stream.StreamTestDataProvider;
 import org.testng.annotations.Test;
 

@@ -107,13 +106,13 @@
         };
         UnaryOperator<Stream<Integer>>[] stuff
                 = new UnaryOperator[] {
                 (UnaryOperator<Stream<Integer>>) s -> s,
                 (UnaryOperator<Stream<Integer>>) s -> s.map(id),
-                (UnaryOperator<Stream<Integer>>) s -> s.sorted(Comparators.naturalOrder()),
-                (UnaryOperator<Stream<Integer>>) s -> s.map(id).sorted(Comparators.naturalOrder()).map(id),
-                (UnaryOperator<Stream<Integer>>) s -> s.filter(LambdaTestHelpers.pEven).sorted(Comparators.naturalOrder()).map(id),
+                (UnaryOperator<Stream<Integer>>) s -> s.sorted(Comparator.naturalOrder()),
+                (UnaryOperator<Stream<Integer>>) s -> s.map(id).sorted(Comparator.naturalOrder()).map(id),
+                (UnaryOperator<Stream<Integer>>) s -> s.filter(LambdaTestHelpers.pEven).sorted(Comparator.naturalOrder()).map(id),
         };
 
         for (int c1Index = 0; c1Index < changers.length; c1Index++) {
             setContext("c1Index", c1Index);
             UnaryOperator<Stream<Integer>> c1 = changers[c1Index];