-
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 FluxCollectToImmutableSet
Refaster rule
#571
Conversation
Looks good. No mutations were possible for these changes. |
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.
Thanks for the PR @mlrprananta 🚀 !
In our OSS repo we try to avoid linking to "internal" things or repositories, so updated the description :).
Made small tweaks to the suggested commit message 😄.
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.
Added a commit to simplify a test 😬.
@@ -377,6 +377,10 @@ Flux<Integer> testFluxFilterSortWithComparator() { | |||
return Flux.just(1, 4, 3, 2).sort(reverseOrder()).filter(i -> i % 2 == 0); | |||
} | |||
|
|||
Mono<ImmutableSet<Integer>> testFluxCollectToImmutableSet() { | |||
return Flux.just(1, 4, 3, 2).collect(toImmutableList()).map(ImmutableSet::copyOf); |
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.
On a second thought, let's simplify the numbers here. I think it makes sense to have 1, 2
as we are collecting and "usually" there will be multiple values to collect. The order used in the test above is important to the method that is used.
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.
Should we also simplify for #570?
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.
Yes, will push a commit :).
Looks good. No mutations were possible for these changes. |
7e4550e
to
28de12f
Compare
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 tiny tweak.
Looks good. No mutations were possible for these changes. |
I hesitated with the "more" as not all were really "more contrived" 😄. |
FluxCollectToImmutableSet
refaster ruleFluxCollectToImmutableSet
Refaster rule
Idea is based on an internal GH thread.
Suggested commit message: