-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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 null-safe index operator in SpEL #29847
Conversation
Hi @Trympyrym, Congratulations on submitting your first PR for the Spring Framework! 👍
We agree that we should introduce an operator for null-safe indexing; however, we are not yet convinced that In any case, your PR is a great start, and we'll take it from here. Thanks! |
Current work on this issue can be viewed in the following feature branch. main...sbrannen:spring-framework:issues/gh-29847-null-safe-index-operator-in-SpEL |
Prior to this commit, SpEL's CompoundExpression omitted the null-safe syntax in AST string representations of indexing operations. To address this, this commit implements isNullSafe() in Indexer. See spring-projectsgh-29847
Introduce SpEL support for syntax like
collection?.[expr]
for null-safe indexing into lists, arrays, maps, etc.