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

Clarify behavior of the Elvis SpEL operator in documentation #30352

Merged

Conversation

simonbasle
Copy link
Contributor

@simonbasle simonbasle commented Apr 18, 2023

This commit improves both the javadoc and the reference guide section on
the Elvis SpEL operator to clarify that in addition to null objects,
empty Strings also lead the operator to evaluate to its second operand.

The reference guide's advanced snippet is modified to use such an empty
String instead of null to make that behavior prominent with some code.

See gh-30318
Closes gh-30352

@simonbasle simonbasle self-assigned this Apr 18, 2023
@simonbasle simonbasle added type: documentation A documentation task in: core Issues in core modules (aop, beans, core, context, expression) labels Apr 18, 2023
@simonbasle simonbasle added this to the 6.1.0-M1 milestone Apr 18, 2023
@simonbasle
Copy link
Contributor Author

draft while waiting for reference guide changes that we might need to adapt to / rebase on.

Copy link
Member

@sbrannen sbrannen left a comment

Choose a reason for hiding this comment

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

I made some suggestions to improve the wording and grammar.

simonbasle and others added 2 commits May 5, 2023 16:08
This commit improves both the javadoc and the reference guide section on
the Elvis SpEL operator to clarify that in addition to `null` objects,
empty Strings also lead the operator to evaluate to its second operand.

The reference guide's advanced snippet is modified to use such an empty
String instead of `null` to make that behavior prominent with some code.

See spring-projectsgh-30318
Closes spring-projectsgh-30352
@simonbasle simonbasle force-pushed the improveElvisDocumentation branch from ac22dc8 to af35aa2 Compare May 5, 2023 14:09
@simonbasle
Copy link
Contributor Author

Rebased on top of Antora changes, ready for merge.

@simonbasle simonbasle marked this pull request as ready for review May 5, 2023 14:10
@simonbasle simonbasle merged commit d3c3088 into spring-projects:main May 5, 2023
@simonbasle simonbasle deleted the improveElvisDocumentation branch May 5, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants