Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor to ternary operator #4023

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Aleexender
Copy link
Contributor

Refactor: use ternary operators for conciseness

This PR refactors a few conditional return statements to use ternary operators in order to improve readability and conciseness.

Changes:

  • Replaced simple if-else statements in methods like Mono#flux(), Mono#filter() with equivalent ternary expressions.
  • Ensured that the logic remains unchanged and safe (e.g., instanceof checks and casting).

Rationale:

  • Improves brevity and readability where the condition and branches are simple.
  • Helps align the style with similar concise expressions already present in the codebase.

Let me know if there's any concern about the use of ternary in these contexts.

@Aleexender Aleexender requested a review from a team as a code owner April 18, 2025 08:24
@Aleexender Aleexender force-pushed the refactor-to-ternary-operator branch from b4ba2d5 to d8728ef Compare April 18, 2025 08:26
@Aleexender Aleexender force-pushed the refactor-to-ternary-operator branch from b9978b7 to e9139e3 Compare April 18, 2025 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant