-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce FluxCollect
Refaster rule
#713
Conversation
Looks good. No mutations were possible for these changes. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Ofcourse, how could I forget about this one....
It's funny that I got a few questions during some of the presentations about how to make sure that you do not have overlapping rules. I'm glad that I can explain the epic self-check to those people 😄. Will close this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and added a commit. Suggested commit message:
Introduce `FluxCollect` Refaster rule (#713)
@@ -1180,6 +1180,19 @@ Flux<T> after(Flux<T> flux, Predicate<? super T> predicate, Comparator<? super T | |||
} | |||
} | |||
|
|||
/* Don't unnecessarily invoke {@link Mono#single()} as {@link Flux#collect(Collector)} always yields one item. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Javadoc :)
/* Don't unnecessarily invoke {@link Mono#single()} as {@link Flux#collect(Collector)} always yields one item. */ | ||
static final class FluxCollect<T, R> { | ||
@BeforeTemplate | ||
Mono<R> before(Flux<T> flux, Collector<T, ?, R> collector) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The collector accepts a super T
.
Doh, I had an old tab open 😛 |
Thanks for the review though @Stephan202 😉. |
As suggested by @Stephan202 in this PR.