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 2012/07/03 20:18:19 UTC
[jira] [Created] (JEXL-135) using map as script parameter or local
variable
Henri Biestro created JEXL-135:
----------------------------------
Summary: using map as script parameter or local variable
Key: JEXL-135
URL: https://issues.apache.org/jira/browse/JEXL-135
Project: Commons JEXL
Issue Type: Bug
Affects Versions: 2.1.1
Reporter: Henri Biestro
Assignee: Henri Biestro
Fix For: 3.0
On behalf of Tomas Kukosa:
Hello,
I use jexl 2.1.1 and I can not access map passed as a script parameter.
When I have the script with 'stat' parameter and following code:
var a = state; ## OK
var b = state[3]; ## ERROR
the first assignment works OK but the second fails with the reason 'undefined variable state'
Also I can see that the interpreter tried to get 'state' variable from context.
The same result is seen if parameter is assigned to local variable and then it is accessed through it.
Is it a bug or intentional behavior?
Regards,
Tomas
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JEXL-135) using map as script parameter or local
variable
Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JEXL-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-135:
-------------------------------
Fix Version/s: 2.1.2
> using map as script parameter or local variable
> -----------------------------------------------
>
> Key: JEXL-135
> URL: https://issues.apache.org/jira/browse/JEXL-135
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 2.1.1
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Fix For: 2.1.2, 3.0
>
>
> On behalf of Tomas Kukosa:
> Hello,
> I use jexl 2.1.1 and I can not access map passed as a script parameter.
> When I have the script with 'stat' parameter and following code:
> var a = state; ## OK
> var b = state[3]; ## ERROR
> the first assignment works OK but the second fails with the reason 'undefined variable state'
> Also I can see that the interpreter tried to get 'state' variable from context.
> The same result is seen if parameter is assigned to local variable and then it is accessed through it.
> Is it a bug or intentional behavior?
> Regards,
> Tomas
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JEXL-135) using map as script parameter or local
variable
Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JEXL-135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro resolved JEXL-135.
--------------------------------
Resolution: Fixed
Committed 1332806.
Fix in parser.jjt, identifiers used in array access expression were not checked against local variables.
> using map as script parameter or local variable
> -----------------------------------------------
>
> Key: JEXL-135
> URL: https://issues.apache.org/jira/browse/JEXL-135
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 2.1.1
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Fix For: 2.1.2, 3.0
>
>
> On behalf of Tomas Kukosa:
> Hello,
> I use jexl 2.1.1 and I can not access map passed as a script parameter.
> When I have the script with 'stat' parameter and following code:
> var a = state; ## OK
> var b = state[3]; ## ERROR
> the first assignment works OK but the second fails with the reason 'undefined variable state'
> Also I can see that the interpreter tried to get 'state' variable from context.
> The same result is seen if parameter is assigned to local variable and then it is accessed through it.
> Is it a bug or intentional behavior?
> Regards,
> Tomas
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira