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<>();