changeset 8110:3db3ae4e0853

8024178: Difference in Stream.collect(Collector) methods located in jdk8 and jdk8-lambda repos Reviewed-by: mduigou
author henryjen
date Tue, 03 Sep 2013 11:44:34 -0700
parents 77a8c4ad516c
children 2e8d51a5596b
files src/share/classes/java/util/stream/DelegatingStream.java src/share/classes/java/util/stream/ReferencePipeline.java src/share/classes/java/util/stream/Stream.java
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/stream/DelegatingStream.java	Wed Aug 28 14:13:03 2013 -0700
+++ b/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/src/share/classes/java/util/stream/ReferencePipeline.java	Wed Aug 28 14:13:03 2013 -0700
+++ b/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/src/share/classes/java/util/stream/Stream.java	Wed Aug 28 14:13:03 2013 -0700
+++ b/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