8024178: Difference in Stream.collect(Collector) methods located in jdk8 and jdk8-lambda repos
authorhenryjen
Tue, 03 Sep 2013 11:44:34 -0700
changeset 19799 efa9ff09b024
parent 19798 b627a06c30ed
child 19800 6e1fef53ea55
8024178: Difference in Stream.collect(Collector) methods located in jdk8 and jdk8-lambda repos Reviewed-by: mduigou
jdk/src/share/classes/java/util/stream/DelegatingStream.java
jdk/src/share/classes/java/util/stream/ReferencePipeline.java
jdk/src/share/classes/java/util/stream/Stream.java
--- a/jdk/src/share/classes/java/util/stream/DelegatingStream.java	Wed Aug 28 14:13:03 2013 -0700
+++ b/jdk/src/share/classes/java/util/stream/DelegatingStream.java	Tue Sep 03 11:44:34 2013 -0700
@@ -209,7 +209,7 @@
     }
 
     @Override
-    public <R, A> R collect(Collector<? super T, A, ? extends R> collector) {
+    public <R, A> R collect(Collector<? super T, A, R> collector) {
         return delegate.collect(collector);
     }
 
--- a/jdk/src/share/classes/java/util/stream/ReferencePipeline.java	Wed Aug 28 14:13:03 2013 -0700
+++ b/jdk/src/share/classes/java/util/stream/ReferencePipeline.java	Tue Sep 03 11:44:34 2013 -0700
@@ -493,7 +493,7 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public final <R, A> R collect(Collector<? super P_OUT, A, ? extends R> collector) {
+    public final <R, A> R collect(Collector<? super P_OUT, A, R> collector) {
         A container;
         if (isParallel()
                 && (collector.characteristics().contains(Collector.Characteristics.CONCURRENT))
--- a/jdk/src/share/classes/java/util/stream/Stream.java	Wed Aug 28 14:13:03 2013 -0700
+++ b/jdk/src/share/classes/java/util/stream/Stream.java	Tue Sep 03 11:44:34 2013 -0700
@@ -657,7 +657,7 @@
      * @see #collect(Supplier, BiConsumer, BiConsumer)
      * @see Collectors
      */
-    <R, A> R collect(Collector<? super T, A, ? extends R> collector);
+    <R, A> R collect(Collector<? super T, A, R> collector);
 
     /**
      * Returns the minimum element of this stream according to the provided