You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2021/06/07 13:15:06 UTC

[jira] [Closed] (JEXL-300) Ant-ish variables should not use safe-access operator syntax

     [ https://issues.apache.org/jira/browse/JEXL-300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro closed JEXL-300.
------------------------------

> Ant-ish variables should not use safe-access operator syntax
> ------------------------------------------------------------
>
>                 Key: JEXL-300
>                 URL: https://issues.apache.org/jira/browse/JEXL-300
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.2
>
>
> The following code
> {code:java}
> a?.x = 1; a.x{code}
> returns 1 and creates ant-ish variable {{a.x}} in the evaluation context. The expected behaviour is to fail with assignment error because there is no {{a}} variable. As an alternative approach we can restrict safe-access operator at the left side of assignment at all, since there is no much sense in assigning anything to what can be null.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)