changeset 8275:2cb4aab5b347

Update tests for Arrays.parallelStream() -> Arrays.stream().parallel()
author briangoetz
date Sat, 20 Apr 2013 19:10:41 -0400
parents 86aff41ca726
children 931a1a5e85b0
files test-ng/bootlib/java/util/stream/TestData.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test-ng/bootlib/java/util/stream/TestData.java	Sat Apr 20 18:56:05 2013 -0400
+++ b/test-ng/bootlib/java/util/stream/TestData.java	Sat Apr 20 19:10:41 2013 -0400
@@ -78,7 +78,7 @@
     // @@@ Temporary garbage class to avoid triggering bugs with lambdas in static methods in interfaces
     public static class Factory {
         public static <T> OfRef<T> ofArray(String name, T[] array) {
-            return new AbstractTestData.RefTestData<>(name, array, Arrays::stream, Arrays::parallelStream,
+            return new AbstractTestData.RefTestData<>(name, array, Arrays::stream, a -> Arrays.stream(a).parallel(),
                                                       Arrays::spliterator, a -> a.length);
         }
 
@@ -113,7 +113,8 @@
 
         // int factories
         public static <T> OfInt ofArray(String name, int[] array) {
-            return new AbstractTestData.IntTestData<>(name, array, Arrays::stream, Arrays::parallelStream, Arrays::spliterator, a -> a.length);
+            return new AbstractTestData.IntTestData<>(name, array, Arrays::stream, a -> Arrays.stream(a).parallel(),
+                                                      Arrays::spliterator, a -> a.length);
         }
 
         public static OfInt ofSpinedBuffer(String name, SpinedBuffer.OfInt buffer) {
@@ -143,7 +144,7 @@
 
         // long factories
         public static <T> OfLong ofArray(String name, long[] array) {
-            return new AbstractTestData.LongTestData<>(name, array, Arrays::stream, Arrays::parallelStream,
+            return new AbstractTestData.LongTestData<>(name, array, Arrays::stream, a -> Arrays.stream(a).parallel(),
                                                        Arrays::spliterator, a -> a.length);
         }
 
@@ -174,7 +175,7 @@
 
         // double factories
         public static <T> OfDouble ofArray(String name, double[] array) {
-            return new AbstractTestData.DoubleTestData<>(name, array, Arrays::stream, Arrays::parallelStream,
+            return new AbstractTestData.DoubleTestData<>(name, array, Arrays::stream, a -> Arrays.stream(a).parallel(),
                                                          Arrays::spliterator, a -> a.length);
         }