[ 
https://issues.apache.org/jira/browse/JEXL-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16984518#comment-16984518
 ] 

Henri Biestro edited comment on JEXL-307 at 11/28/19 4:13 PM:
--------------------------------------------------------------

Thanks for the find.
 # 
[src/main/java/org/apache/commons/jexl3/JexlEngine.java|https://github.com/apache/commons-jexl#diff-6cd4728e86a21e88658014798b66f1c6]
 # 
[src/main/java/org/apache/commons/jexl3/internal/Engine.java|https://github.com/apache/commons-jexl#diff-41922f0eb638444de5b25b4cc16b6f1f]
 # 
[src/test/java/org/apache/commons/jexl3/LexicalTest.java|https://github.com/apache/commons-jexl#diff-e970fae7048740d7efe69fa7b2e1c082]

Changeset: 4f1a6d15e8a9a837b4e2326f74a44a8632163559
 Author: henrib <[email protected]>
 Date: 2019-11-28 17:09
 Message: JEXL-307: handle top-level lambda creation consistently


was (Author: henrib):
Changeset: 4f1a6d15e8a9a837b4e2326f74a44a8632163559
Author:    henrib <[email protected]>
Date:      2019-11-28 17:09
Message:   JEXL-307: handle top-level lambda creation consistently

> Variable redeclaration option
> -----------------------------
>
>                 Key: JEXL-307
>                 URL: https://issues.apache.org/jira/browse/JEXL-307
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.2
>
>
> As of now, JEXL allows a script writer to redeclare a local variable during 
> script evaluation.
> {code:java}
> var a = 1; var a = 2;{code}
> This may lead to potential errors with misspelled names and clashed 
> variables. Checking for already defined variable is a common feature of many 
> languages. This feature can be implemented in JEXL as an additional option of 
> JexlFeatures class, enabled by default, thus allowing compatibility with 
> existing code.



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

Reply via email to