commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [JEXL] Multi-statement expression evaluation - change to last?
Date Tue, 13 May 2008 20:12:17 GMT
On 5/13/08, sebb <> wrote:
> The Jexl eval() method allows for multiple statements in the expression.

What method is that? oacj.Expression#evaluate(JexlContext) ?

>  However, the result of the expression is currently taken to be the
>  first statement.

Yes, in fact, only the first will be evaluated.

>  This is at odds with other scripting languages such as Javascript and
>  Beanshell which return the value of the last statement.

You can get that behavior using oacj.Script rather than
oacj.Expression. Perhaps you are looking for scripts?


>  Seems to me that this behaviour is counter-intuitive (which is
>  possibly why the warning is logged).
>  Would there be any support for changing the behaviour to return the
>  value of the last statement?
>  [If necessary, perhaps this could be selected as a run-time option.]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message