From d93c1b1a12aeb33b8514f38079d26420e4f9f5ba 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 ab9da93f3c..57cb55a636 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) {