-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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 IndexAccessor
SPI to customize the SpEL Indexer
#26478
Introduce IndexAccessor
SPI to customize the SpEL Indexer
#26478
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
03877f7
to
609002c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
...ion/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java
Outdated
Show resolved
Hide resolved
609002c
to
89cc12d
Compare
spring-expression/src/main/java/org/springframework/expression/spel/ast/Indexer.java
Outdated
Show resolved
Hide resolved
89cc12d
to
79ed058
Compare
79ed058
to
1409ba7
Compare
IndexAccessor
SPI to configure the SpEL Indexer
it's glad to hear your response. Your affirmation cheers me up. |
When indexing into an object, the target object can never be null. See spring-projectsgh-26409 See spring-projectsgh-26478
Prior to this commit, the read() method in the IndexAccessor SPI declared a return type of ValueRef which introduced a package cycle. This commit addresses this by aligning with the PropertyAccess SPI and returning TypedValue from IndexAccessor's read() method. This commit also reworks the internals of Indexer based on a new, local IndexAccessorValueRef implementation. See spring-projectsgh-26409 See spring-projectsgh-26478
Prior to this commit, the read() method in the IndexAccessor SPI declared a return type of ValueRef which introduced a package cycle. This commit addresses this by aligning with the PropertyAccess SPI and returning TypedValue from IndexAccessor's read() method. This commit also reworks the internals of Indexer based on a new, local IndexAccessorValueRef implementation. See gh-26409 See gh-26478
This comment was marked as off-topic.
This comment was marked as off-topic.
This has been merged into main in ae3dc0d along with an additional 6 commits that revise the PR. For an example, see the Lines 646 to 687 in ae3dc0d
@jackmiking, thanks again for putting together the initial prototype! @artembilan, @pilak, @jackmiking, @jdomigon, @martin-jamszolik, and anyone else interested, we would be grateful if you could try this out in the upcoming 6.2 M1 release (scheduled for tomorrow) and let us know if you run into any issues or come up with any ideas for how to improve (or simplify) the new Cheers, Sam p.s. I have opened a separate issue (#32613) to introduce compilation support for an |
I have reviewed the code and made some cases. It works great. |
Hi @jackmiking, Thanks for trying it out and letting us know that it works! 👍 |
closes gh-26409.