8022622: javac, two tests are failing with compile time error after class Collector was modified

Reviewed-by: mcimadamore
This commit is contained in:
Vicente Romero 2013-08-10 16:26:50 +01:00
parent cee3c2853b
commit 22652f5354
2 changed files with 5 additions and 5 deletions

View File

@ -34,15 +34,15 @@ import java.util.stream.*;
class TargetType59 {
<T, R> Collector<T, R> m(Supplier<? extends R> supplier, BiConsumer<R, T> accumulator) {
<T, R> Collector<T, String, R> m(Supplier<? extends R> supplier, BiConsumer<R, T> accumulator) {
return null;
}
<T, C extends Collection<T>> Collector<T,C> test1(Supplier<C> collectionFactory) {
<T, C extends Collection<T>> Collector<T, String, C> test1(Supplier<C> collectionFactory) {
return m(collectionFactory, Collection::add);
}
Collector<String, StringBuilder> test2(Supplier<StringBuilder> sb) {
Collector<String, String, StringBuilder> test2(Supplier<StringBuilder> sb) {
return m(sb, StringBuilder::append);
}
}

View File

@ -38,8 +38,8 @@ class TargetType61 {
return g(classifier, TreeMap::new, m(HashSet::new));
}
<R> Collector<Integer, R> m(Supplier<R> s) { return null; }
<R> Collector<Integer, String, R> m(Supplier<R> s) { return null; }
<T, K, D, M extends Map<K, D>>
Collector<T, M> g(Function<T, K> classifier, Supplier<M> mapFactory, Collector<T, D> downstream) { return null; }
Collector<T, String, M> g(Function<T, K> classifier, Supplier<M> mapFactory, Collector<T, String, D> downstream) { return null; }
}