[
https://issues.apache.org/jira/browse/JEXL-404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro updated JEXL-404:
-------------------------------
Description:
The same way the expression a?.b shortcuts evaluation and returns null if a is
null, this enhancement is to have the equivalent a?['b'] return null for the
same reason.
Code example:
{code:java}
var a = {:};
a.b; // ok
a['b']; // ok
a?.b; // ok
a?['b']; // 3.3 - parsing error in ';' {code}
with new JexlBuilder().safe(false).strict(true)
Thanks!
was:
Code example:
{code:java}
var a = {:};
a.b; // ok
a['b']; // ok
a?.b; // ok
a?['b']; // parsing error in ';' {code}
with new JexlBuilder().safe(false).strict(true)
Thanks!
> Support array-access safe navigation (x?[y])
> --------------------------------------------
>
> Key: JEXL-404
> URL: https://issues.apache.org/jira/browse/JEXL-404
> Project: Commons JEXL
> Issue Type: Improvement
> Affects Versions: 3.3
> Reporter: Xu Pengcheng
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.3.1
>
>
> The same way the expression a?.b shortcuts evaluation and returns null if a
> is null, this enhancement is to have the equivalent a?['b'] return null for
> the same reason.
> Code example:
> {code:java}
> var a = {:};
> a.b; // ok
> a['b']; // ok
> a?.b; // ok
> a?['b']; // 3.3 - parsing error in ';' {code}
> with new JexlBuilder().safe(false).strict(true)
>
> Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)