-
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
Extend MonoThen
Refaster rule
#1556
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.
Suggested commit message:
Extend `MonoThen` Refaster rule (#1556)
Mono#when
statementsMonoThen
Refaster rule (#1556)
MonoThen
Refaster rule (#1556)MonoThen
Refaster rule
418fc05
to
a985e47
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 commit. Nice one; tnx @mohamedsamehsalah!
@rickie feel free to merge if you agree with the latest change.
@@ -939,7 +939,7 @@ Flux<T> after(Mono<T> mono) { | |||
static final class MonoThen<T> { | |||
@BeforeTemplate | |||
Mono<@Nullable Void> before(Mono<T> mono) { | |||
return Refaster.anyOf(mono.ignoreElement().then(), mono.flux().then()); | |||
return Refaster.anyOf(mono.ignoreElement().then(), mono.flux().then(), Mono.when(mono)); |
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.
We can also add Mono.whenDelayError(mono)
.
...e-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/ReactorRulesTestInput.java
Outdated
Show resolved
Hide resolved
Looks good. No mutations were possible for these changes. |
1 similar comment
Looks good. No mutations were possible for these changes. |
59b1169
to
ec33dd8
Compare
Looks good. No mutations were possible for these changes. |
|
Mono#when
aggregates multiple publishers into oneMono<Void>
, passing only one publisher to the argument is redundant and can be re-fastered into aMono#then
.Suggested commit message