Skip to content

Commit

Permalink
Annotate a couple new stream APIs. (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk authored Oct 7, 2024
1 parent 694ca99 commit 6ee45ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ public void accept(T t) {
* @return a {@code Collector} which aggregates the results of two supplied collectors.
* @since 12
*/
public static <T, R1, R2, R>
public static <T extends @Nullable Object, R1 extends @Nullable Object, R2 extends @Nullable Object, R extends @Nullable Object>
Collector<T, ?, R> teeing(Collector<? super T, ?, R1> downstream1,
Collector<? super T, ?, R2> downstream2,
BiFunction<? super R1, ? super R2, R> merger) {
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/util/stream/Stream.java
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public interface Stream<T extends @Nullable Object> extends BaseStream<T, Stream
* @see #flatMap flatMap
* @since 16
*/
default <R> Stream<R> mapMulti(BiConsumer<? super T, ? super Consumer<R>> mapper) {
default <R extends @Nullable Object> Stream<R> mapMulti(BiConsumer<? super T, ? super Consumer<R>> mapper) {
Objects.requireNonNull(mapper);
return flatMap(e -> {
SpinedBuffer<R> buffer = new SpinedBuffer<>();
Expand Down

0 comments on commit 6ee45ed

Please sign in to comment.