8024178: Difference in Stream.collect(Collector) methods located in jdk8 and jdk8-lambda repos
Reviewed-by: mduigou
This commit is contained in:
parent
f7b61b93f1
commit
45d26c9571
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user