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

Introduce MonoSingle Refaster rule #703

Merged
merged 2 commits into from
Jul 5, 2023
Merged

Conversation

rickie
Copy link
Member

@rickie rickie commented Jun 29, 2023

Identified as part of the ongoing internal migration to WebClient.

@rickie rickie added this to the 0.13.0 milestone Jun 29, 2023
@rickie rickie requested review from Stephan202 and Badbond June 29, 2023 12:39
@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.

Comment on lines 422 to 423
* Don't unnecessarily transform a {@link Mono} to a {@link Flux} before calling {@link
* Mono#single()}.
Copy link
Member

@Badbond Badbond Jun 29, 2023

Choose a reason for hiding this comment

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

This sentence can be a bit improved as technically they are not calling Mono#single but rather Flux#single. Perhaps better:

Suggested change
* Don't unnecessarily transform a {@link Mono} to a {@link Flux} before calling {@link
* Mono#single()}.
* Don't unnecessarily transform a {@link Mono} to a {@link Flux} to expect exactly one item.

Second part of the sentence based off of Mono#single's Javadoc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine by me, will update.

@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.

Copy link
Member

@Badbond Badbond left a comment

Choose a reason for hiding this comment

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

Thanks for the tweak!

Introduce `MonoSingle` Refaster rule (#703)

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.

Tnx!

@Stephan202
Copy link
Member

NB: I locally also have a note for flux.collect(...).single() -> flux.collect(...), since collect always yields one item. But that could be a separate PR; I'll keep it on my list.

@rickie rickie force-pushed the rossendrijver/mono_flux_single branch from e815c4e to 130da05 Compare July 2, 2023 07:53
@github-actions
Copy link

github-actions bot commented Jul 2, 2023

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
Copy link
Member Author

rickie commented Jul 5, 2023

NB: I locally also have a note for flux.collect(...).single() -> flux.collect(...), since collect always yields one item. But that could be a separate PR; I'll keep it on my list.

Filed a PR: #713.

It's the reason I didn't merge this one yet. Will now rebase and merge after some of the dependencies.

@rickie rickie force-pushed the rossendrijver/mono_flux_single branch from 130da05 to da481eb Compare July 5, 2023 11:43
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

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.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rickie rickie merged commit 006665e into master Jul 5, 2023
@rickie rickie deleted the rossendrijver/mono_flux_single branch July 5, 2023 11:54
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