commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Blinov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JEXL-243) Allow restricting available features in Script/Expressions
Date Tue, 31 Oct 2017 05:24:00 GMT

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

Dmitri Blinov commented on JEXL-243:
------------------------------------

Well, this is basically works, the only thing is what if I have in one framework two different
types of scripts, say scripts with side effects and scripts without side effects (or better
to name them getters and setters). Those types of scripts are supposed to use a single Jexl
engine instance. It would be more practical to be able to specify desired features right to
JexlEngine.createScript() method. Maybe JexlEngine.createExpression() should get such an overload
too, but maybe it's even better, not to speak of backward compatibility now, to have the only
one JexlEngine.createScript() which could create both "scripts" and "expressions" by simply
specifying "right" feature sets in each case.

> Allow restricting available features in Script/Expressions
> ----------------------------------------------------------
>
>                 Key: JEXL-243
>                 URL: https://issues.apache.org/jira/browse/JEXL-243
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>             Fix For: 3.2
>
>
> Restrict features related to potential dangers/difficulties one may encounter whilst
scripting;
> Reserved Names: a set of reserved variable names that can not be used as local variable
(or parameter) names
> Registers: boolean property allowing parsing of register syntax (#number)
> Global Side Effect : boolean property controlling assigning/modifying values on global
variables
> Side Effect: boolean property controlling side effects assigning/modifying values on
any variable
> New Instance: boolean property controlling creating new instances through new(...) or
using class as functor
> Loops: boolean property controlling usage of loop constructs (while(true), for(...))
> Lambda: boolean property controlling usage of script function declarations
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message