From da6eee28bce3efa657df912109c3a5c3cf38da62 Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Wed, 21 Feb 2024 23:06:26 +0100 Subject: [PATCH] Suggestion --- .../tech/picnic/errorprone/refasterrules/ReactorRules.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java index ab9da93f3c0..57cb55a6368 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java @@ -41,7 +41,6 @@ import java.util.function.Predicate; import java.util.function.Supplier; import java.util.stream.Collector; -import java.util.stream.Stream; import org.jspecify.annotations.Nullable; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; @@ -1206,10 +1205,7 @@ Flux after(Flux> flux, int prefetch) { } } - /** - * Don't unnecessarily convert a {@link Collection} to a {@link Stream} before creating a {@link - * Flux}. - */ + /** Prefer {@link Flux#fromIterable(Iterable)} over less efficient alternatives. */ static final class FluxFromIterable { @BeforeTemplate Flux before(Collection collection) {