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

Support safe navigation operator in spel operators/functions #1010

Open
sebakerckhof opened this issue Nov 27, 2023 · 0 comments
Open

Support safe navigation operator in spel operators/functions #1010

sebakerckhof opened this issue Nov 27, 2023 · 0 comments

Comments

@sebakerckhof
Copy link

Is your feature request related to a problem? Please describe.
I would like to use the safe navigation operator in combination with spel operators and functions like: .contains(), .toLowerCase(), .endsWith() etc, so I can apply them safely to variables that might be null.

Describe the solution you'd like
Maybe we could maybe have something similar to fieldSeperator?

Describe alternatives you've considered
I've tried overwriting the spelOp in the operators like: ${0}.endsWith(${1}) -> ${0}?.endsWith(${1}), this throws errors when importing. I think the ? is reserved for another use in the parsing.

Currently I'm just running regexes on import/export to transform everything from and to the safe navigation operator, but that's obviously not such a neat solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant