changeset 7175:0e769b2115cc

Eliminate more type witnesses after recent inference bugfixes
author briangoetz
date Mon, 28 Jan 2013 12:27:23 -0500
parents 4beb43ec8f19
children 404ba8d46d50
files test-ng/boottests/java/util/stream/UnorderedTest.java test-ng/tests/org/openjdk/tests/java/util/stream/GroupByOpTest.java test-ng/tests/org/openjdk/tests/java/util/stream/ZipOpTest.java
diffstat 3 files changed, 12 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/test-ng/boottests/java/util/stream/UnorderedTest.java	Mon Jan 28 11:15:56 2013 +0100
+++ b/test-ng/boottests/java/util/stream/UnorderedTest.java	Mon Jan 28 12:27:23 2013 -0500
@@ -79,7 +79,7 @@
     }
 
     private List<List<UnaryOperator<IntStream>>> intPermutationOfFunctions =
-            LambdaTestHelpers.perm(Arrays.<UnaryOperator<IntStream>>asList(
+            LambdaTestHelpers.perm(Arrays.asList(
                     s -> s.sorted(),
                     s -> s.distinct(),
                     s -> s.limit(5)
@@ -106,7 +106,7 @@
     }
 
     private List<List<UnaryOperator<LongStream>>> longPermutationOfFunctions =
-            LambdaTestHelpers.perm(Arrays.<UnaryOperator<LongStream>>asList(
+            LambdaTestHelpers.perm(Arrays.asList(
                     s -> s.sorted(),
                     s -> s.distinct(),
                     s -> s.limit(5)
@@ -133,7 +133,7 @@
     }
 
     private List<List<UnaryOperator<DoubleStream>>> doublePermutationOfFunctions =
-            LambdaTestHelpers.perm(Arrays.<UnaryOperator<DoubleStream>>asList(
+            LambdaTestHelpers.perm(Arrays.asList(
                     s -> s.sorted(),
                     s -> s.distinct(),
                     s -> s.limit(5)
--- a/test-ng/tests/org/openjdk/tests/java/util/stream/GroupByOpTest.java	Mon Jan 28 11:15:56 2013 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/stream/GroupByOpTest.java	Mon Jan 28 12:27:23 2013 -0500
@@ -109,7 +109,7 @@
     List<MapperData<Integer, ?>> getMapperData(StreamTestData<Integer> data) {
         int uniqueSize = data.into(new HashSet<>()).size();
 
-        return Arrays.<MapperData<Integer, ?>>asList(
+        return Arrays.asList(
             new MapperData<>(mId, uniqueSize),
             new MapperData<>(mZero, Math.min(1, data.size())),
             new MapperData<>(mDoubler, uniqueSize),
--- a/test-ng/tests/org/openjdk/tests/java/util/stream/ZipOpTest.java	Mon Jan 28 11:15:56 2013 +0100
+++ b/test-ng/tests/org/openjdk/tests/java/util/stream/ZipOpTest.java	Mon Jan 28 12:27:23 2013 -0500
@@ -24,6 +24,7 @@
  */
 package org.openjdk.tests.java.util.stream;
 
+import java.util.List;
 import java.util.stream.OpTestCase;
 import java.util.stream.StreamTestData;
 import java.util.stream.StreamTestDataProvider;
@@ -41,20 +42,15 @@
 public class ZipOpTest extends OpTestCase {
 
     public void testZip() {
-        assertContents(Streams.zip(Collections.<Integer>emptyList().stream(),
-                                   Collections.<Integer>emptyList().stream(),
-                                   Integer::sum).iterator(),
-                       Collections.<Integer>emptyList().iterator());
+        List<Integer> emptyIntList = Collections.emptyList();
+        assertContents(Streams.zip(emptyIntList.stream(), emptyIntList.stream(), Integer::sum).iterator(),
+                       emptyIntList.iterator());
 
-        assertContents(Streams.zip(Collections.<Integer>emptyList().stream(),
-                                   countTo(10).stream(),
-                                   Integer::sum).iterator(),
-                       Collections.<Integer>emptyList().iterator());
+        assertContents(Streams.zip(emptyIntList.stream(), countTo(10).stream(), Integer::sum).iterator(),
+                       emptyIntList.iterator());
 
-        assertContents(Streams.zip(countTo(10).stream(),
-                                   Collections.<Integer>emptyList().stream(),
-                                   Integer::sum).iterator(),
-                       Collections.<Integer>emptyList().iterator());
+        assertContents(Streams.zip(countTo(10).stream(), emptyIntList.stream(), Integer::sum).iterator(),
+                       emptyIntList.iterator());
 
         Stream<Integer> x = countTo(2).stream();
         x = Streams.zip(x, countTo(2).stream(), Integer::sum);