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

Dmitri Blinov updated JEXL-300:
-------------------------------
    Description: 
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.

  was:
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


> 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
>            Priority: Major
>
> 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
(v7.6.3#76005)

Reply via email to