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

Upgrade Project Reactor 2022.0.2 -> 2022.0.3 #499

Merged
merged 5 commits into from
Feb 20, 2023

Conversation

Picnic-Bot
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
io.projectreactor:reactor-bom (source) import patch 2022.0.2 -> 2022.0.3

Release Notes

reactor/reactor

v2022.0.3

Compare Source

2022.0.3 release train is made of:


  • If you want to rebase/retry this PR, check this box

@Picnic-Bot
Copy link
Contributor Author

Picnic-Bot commented Feb 16, 2023

Suggested commit message:

Upgrade Project Reactor 2022.0.2 -> 2022.0.3 (#499)

See:
- https://github.com/reactor/reactor/releases/tag/2022.0.3
- https://github.com/reactor/reactor/compare/2022.0.2...2022.0.3

@rickie
Copy link
Member

rickie commented Feb 16, 2023

This might be interesting:

Add .singleOptional() to Mono and Flux by @AndreasHuber-CH in reactor/reactor-core#3317

@Stephan202 Stephan202 added this to the 0.9.0 milestone Feb 16, 2023
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.

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()) :)

@Picnic-Bot Picnic-Bot force-pushed the renovate/io.projectreactor-reactor-bom-2022.x branch 4 times, most recently from 894c659 to 73b2d64 Compare February 20, 2023 02:00
@rickie
Copy link
Member

rickie commented Feb 20, 2023

Based on your comment I added a simple one to simplify flux().collect(toOptional()).

@rickie rickie force-pushed the renovate/io.projectreactor-reactor-bom-2022.x branch from fb36a48 to 5ee0703 Compare February 20, 2023 08:11
@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

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

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

Choose a reason for hiding this comment

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

Suggested change
static final class MonoCollectToOptional<T> {
static final class MonoSingleOptional<T> {

Comment on lines 708 to 709
mono.map(Optional::of).defaultIfEmpty(Optional.empty()),
mono.flux().collect(toOptional()));
Copy link
Member

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?

@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 force-pushed the renovate/io.projectreactor-reactor-bom-2022.x branch from 6fbee0f to d13a5ed Compare February 20, 2023 10:02
@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
Copy link
Member

rickie commented Feb 20, 2023

@Stephan202 applied the latest changes 😉.

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.

(I can also apply this later; in meeting now.)

Comment on lines 235 to 236
Mono.just("foo").map(Optional::of).defaultIfEmpty(Optional.empty()),
Mono.just("bar").flux().collect(toOptional()));
Copy link
Member

Choose a reason for hiding this comment

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

Should swap these too ;)

Copy link
Member

Choose a reason for hiding this comment

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

Done.

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

@Stephan202
Copy link
Member

Tnx; LGTM!

@rickie rickie changed the title Upgrade io.projectreactor:reactor-bom 2022.0.2 -> 2022.0.3 Upgrade Project Reactor 2022.0.2 -> 2022.0.3 Feb 20, 2023
@rickie rickie merged commit fd6a45e into master Feb 20, 2023
@rickie rickie deleted the renovate/io.projectreactor-reactor-bom-2022.x branch February 20, 2023 17:58
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.

None yet

3 participants