forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support SpEL compilation for public methods in private subtypes
Commit c79436f ensured that methods are invoked via a public interface or public superclass when compiling Spring Expression Language (SpEL) expressions involving method references or property access (see MethodReference, PropertyOrFieldReference, and collaborating support classes). However, compilation of expressions that access properties by indexing into an object by property name is still not properly supported in all scenarios. To address those remaining use cases, this commit ensures that methods are invoked via a public interface or public superclass when accessing a property by indexing into an object by the property name – for example, `person['name']` instead of `person.name`. In addition, SpEL's Indexer now properly relies on the CompilablePropertyAccessor abstraction instead of hard-coding support for only OptimalPropertyAccessor. This greatly reduces the complexity of the Indexer and simultaneously allows the Indexer to potentially support other CompilablePropertyAccessor implementations. Closes spring-projectsgh-29857
- Loading branch information
Showing
4 changed files
with
68 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters