Closed as not planned
Closed as not planned
Description
Juan Domínguez González opened SPR-16929 and commented
When parsing an expression which combines null-safe and list/array navigation it fails with a parse exception.
Example: accessing first element of a (possibly null) list/array of strings: stringList?[0]
org.springframework.expression.spel.SpelParseException: EL1041E: After parsing a valid expression, there is still more data in the expression: 'select(?[)
I'm not sure if the syntax I've used is correct, but, to me it seems the most natural one.
Combining the null safe operator and navigation using get, seems to work: e.j: stringList?.get(0)
Alternative syntaxes, such as (stringList?)[0]
or stringList?.[0]
, also fail to compile..
Affects: 4.3.16