[ https://issues.apache.org/jira/browse/JEXL-429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-429: ------------------------------- Fix Version/s: 3.4.1 > Ternary expression regression > ----------------------------- > > Key: JEXL-429 > URL: https://issues.apache.org/jira/browse/JEXL-429 > Project: Commons JEXL > Issue Type: Bug > Affects Versions: 3.4.0 > Reporter: Shuo Geng > Assignee: Henri Biestro > Priority: Major > Fix For: 3.4.1 > > > {*}Regression{*}: > {code:java} > const f = function(a) {return a;}; > b ? b : f(2);{code} > When the script is executed, there is a variable *b* in the jexl context with > value as {*}1{*}. > The script returns 1 as expected in 3.3, but throws a parsing exception in > 3.4.0. > {code:java} > parsing error in ';' > at org.apache.commons.jexl3.JexlEngine.createScript(JexlEngine.java:411) > {code} > If the ternary statement is changed to {{b ? f(2) : b;}} , there is no issue > and 2 is returned as expected. -- This message was sent by Atlassian Jira (v8.20.10#820010)