Skip to content
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 MonoIdentity Refaster rule #470

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

werli
Copy link
Member

@werli werli commented Jan 19, 2023

Sorry for two bite size PRs, but I've just now noticed one more case which wasn't covered in #465.

Mono#singleOrEmpty() has side-effects, but only if there is more than one element which by definition cannot occur after a Mono#flux() call.

I've checked again to see whether more expressions would qualify, however Mono#single() and Mono#last() don't qualify since they have side-effects when no element can be found.

Suggested commit message

Extend `MonoIdentity` Refaster rule (#470)

By flagging expressions of the form `mono.flux().singleOrEmpty()`.

By flagging expressions of the form `mono.flux().singleOrEmpty()`.
@github-actions
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie requested review from rickie and Stephan202 January 19, 2023 11:56
@rickie rickie modified the milestones: 0.9.0, 0.8.0 Jan 19, 2023
Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice! Small PRs are very welcome 😉. Easy to review as well ;).

Lekker bezig man!

Suggested commit message LGTM.

Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful ❤️

@rickie rickie merged commit 81ffd04 into master Jan 19, 2023
@rickie rickie deleted the werli/mono-identity-flux-singleorempty branch January 19, 2023 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants