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

Reviewed-by: mduigou
This commit is contained in:
Henry Jen 2013-09-03 11:44:34 -07:00
parent f7b61b93f1
commit 45d26c9571
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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))

View File

@ -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