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 2018/01/21 10:47:00 UTC
[jira] [Updated] (JEXL-248) Allow range subexpression as an array
property assignment identifier
[ https://issues.apache.org/jira/browse/JEXL-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-248:
-------------------------------
Assignee: Henri Biestro
> Allow range subexpression as an array property assignment identifier
> --------------------------------------------------------------------
>
> Key: JEXL-248
> URL: https://issues.apache.org/jira/browse/JEXL-248
> Project: Commons JEXL
> Issue Type: Improvement
> Affects Versions: 3.1
> Reporter: Dmitri Blinov
> Assignee: Henri Biestro
> Priority: Major
>
> While it is syntaxically possible to use range subexpression for accessing array properties
> {code:java}
> x = stringbuilder("qwerty"); x[0..2]{code}
> It is not allowed now to use range subexpression for setting array properties, for example the following code
> {code:java}
> x = stringbuilder("qwerty"); x[0..2] = "qq"; {code}
> throws a parsing exception {{org.apache.commons.jexl3.JexlException$Assignment: "qq"@1:40 assignment error near '... qwerty"); x[0..2] = "qq"; x ...'}}
> Nevertheless the following code parses and executes as expected
> {code:java}
> y = 0..2; x = stringbuilder("qwerty"); x[y] = "qq"; x{code}
> It would be more convenient to have inline range subexpressions allowed for accessing arrays for both getting and setting
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)