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

Incorrect #this and #root variable examples in SpEL documentation #31770

Closed
mhalbritter opened this issue Dec 6, 2023 · 2 comments
Closed

Incorrect #this and #root variable examples in SpEL documentation #31770

mhalbritter opened this issue Dec 6, 2023 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Milestone

Comments

@mhalbritter
Copy link
Contributor

mhalbritter commented Dec 6, 2023

There is something wrong or incomplete in the SpEL documentation.

  • SimpleEvaluationContext.forReadOnlyDataAccess() doesn't compile. I think that should be SimpleEvaluationContext.forReadOnlyDataBinding().build().
  • The "following example" has no mention of #root.

The following examples show how to use the #this and #root variables:

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 6, 2023
@sbrannen sbrannen self-assigned this Dec 6, 2023
@sbrannen sbrannen added type: documentation A documentation task in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 6, 2023
@sbrannen sbrannen added this to the 6.1.2 milestone Dec 6, 2023
@sbrannen sbrannen changed the title Incorrect SpEL documentation Incorrect example in SpEL documentation Dec 6, 2023
@sbrannen sbrannen changed the title Incorrect example in SpEL documentation Incorrect examples in SpEL documentation Dec 6, 2023
@sbrannen sbrannen changed the title Incorrect examples in SpEL documentation Incorrect #this and #root variable examples in SpEL documentation Dec 6, 2023
@sbrannen
Copy link
Member

sbrannen commented Dec 6, 2023

Thanks for bringing that to our attention, @mhalbritter. 👍

I've fixed those errors (as well as some others that I noticed in the process) and added a new example using #root.

See the 6.1.2 snapshot reference docs.

@mhalbritter
Copy link
Contributor Author

Thanks Sam!

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

No branches or pull requests

3 participants