-
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
Upgrade Project Reactor 2022.0.2 -> 2022.0.3 #499
Conversation
Suggested commit message:
|
This might be interesting:
|
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.
This might be interesting:
Add .singleOptional() to Mono and Flux by @AndreasHuber-CH in reactor/reactor-core#3317
Indeed. Shall we add a Refaster rule? Cause this is clearly nicer than flux().collect(toOptional())
:)
894c659
to
73b2d64
Compare
Based on your comment I added a simple one to simplify |
fb36a48
to
5ee0703
Compare
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.
Quick GitHub UI-based review :)
/** | ||
* Prefer a collection using {@link MoreCollectors#toOptional()} over more contrived alternatives. | ||
*/ | ||
/** Prefer {@link Mono#singleOptional()} over more contrived alternatives. */ | ||
// XXX: Consider creating a plugin that flags/discourages `Mono<Optional<T>>` method return | ||
// types, just as we discourage nullable `Boolean`s and `Optional`s. | ||
static final class MonoCollectToOptional<T> { |
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.
static final class MonoCollectToOptional<T> { | |
static final class MonoSingleOptional<T> { |
mono.map(Optional::of).defaultIfEmpty(Optional.empty()), | ||
mono.flux().collect(toOptional())); |
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.
Since we often list the "more likely" variant first, shall we swap these?
Looks good. No mutations were possible for these changes. |
6fbee0f
to
d13a5ed
Compare
Looks good. No mutations were possible for these changes. |
@Stephan202 applied the latest 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.
(I can also apply this later; in meeting now.)
Mono.just("foo").map(Optional::of).defaultIfEmpty(Optional.empty()), | ||
Mono.just("bar").flux().collect(toOptional())); |
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 swap these too ;)
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.
Done.
Looks good. No mutations were possible for these changes. |
Tnx; LGTM! |
This PR contains the following updates:
2022.0.2
->2022.0.3
Release Notes
reactor/reactor
v2022.0.3
Compare Source
2022.0.3
release train is made of:3.5.3
1.1.3
1.3.16