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

Henri Biestro resolved JEXL-427.
--------------------------------
    Resolution: Fixed

3.4.1 behavior - JexlBuilder.booleanLogical(false) - make the logical 
(short-circuit) expressions return the last evaluated argument.
3.4 behavior can be restored with JexlBuilder.booleanLogical(true) - belt and 
suspenders -; the new default however is not expected to cause problems in the 
field.

> Avoid coercing logical expressions to boolean
> ---------------------------------------------
>
>                 Key: JEXL-427
>                 URL: https://issues.apache.org/jira/browse/JEXL-427
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.4.0
>            Reporter: Xu Pengcheng
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.4.1
>
>
> As of JEXL 3.4, logical expressions (&& , ||) are coercing their results to 
> boolean; the ask is to let the results be as is. When used as conditions, 
> they will be coerced to boolean by the testPredicate function anyhow; in 
> other cases, this allows short-circuit evaluation similar to EcmaScript.
> The discussion/comments below stem from the initial request:
> *Support &: operator:*
> Similiar with ternary conditional `?:`, but
> {code:javascript}
> x &: y
> {code}
> equals
> {code:javascript}
> x ? y : x
> {code}
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to