[jira] [Resolved] (JEXL-307) Variable redeclaration option

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Resolved] (JEXL-307) Variable redeclaration option

Bruno P. Kinoshita (Jira)

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

Henri Biestro resolved JEXL-307.
    Resolution: Fixed

Changeset: a9411b42ac64c9cf97ba4f1ce5d61bc77d8b6997
Author:    henrib <[hidden email]>
Date:      2019-11-07 22:13
Message:   JEXL-307: tidy API

> 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