提交 af2451e8 编写于 作者: H henryjen

8024178: Difference in Stream.collect(Collector) methods located in jdk8 and jdk8-lambda repos

Reviewed-by: mduigou
上级 bf4ae1e2
......@@ -209,7 +209,7 @@ public class DelegatingStream<T> implements Stream<T> {
}
@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);
}
......
......@@ -493,7 +493,7 @@ abstract class ReferencePipeline<P_IN, P_OUT>
@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))
......
......@@ -657,7 +657,7 @@ public interface Stream<T> extends BaseStream<T, Stream<T>> {
* @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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册