From 6ee45ed546564442453e6d1cd82c4a73836b4a24 Mon Sep 17 00:00:00 2001 From: Chris Povirk Date: Mon, 7 Oct 2024 11:09:34 -0400 Subject: [PATCH] Annotate a couple new `stream` APIs. (#80) --- src/java.base/share/classes/java/util/stream/Collectors.java | 2 +- src/java.base/share/classes/java/util/stream/Stream.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/util/stream/Collectors.java b/src/java.base/share/classes/java/util/stream/Collectors.java index fab29d68541..200af2a8f83 100644 --- a/src/java.base/share/classes/java/util/stream/Collectors.java +++ b/src/java.base/share/classes/java/util/stream/Collectors.java @@ -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 + public static Collector teeing(Collector downstream1, Collector downstream2, BiFunction merger) { diff --git a/src/java.base/share/classes/java/util/stream/Stream.java b/src/java.base/share/classes/java/util/stream/Stream.java index 70e7539ba2a..88ee9f4a869 100644 --- a/src/java.base/share/classes/java/util/stream/Stream.java +++ b/src/java.base/share/classes/java/util/stream/Stream.java @@ -429,7 +429,7 @@ public interface Stream extends BaseStream Stream mapMulti(BiConsumer> mapper) { + default Stream mapMulti(BiConsumer> mapper) { Objects.requireNonNull(mapper); return flatMap(e -> { SpinedBuffer buffer = new SpinedBuffer<>();