[ https://issues.apache.org/jira/browse/JEXL-429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-429: ------------------------------- Description: {*}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. was: {*}Regression #1{*}: {code:java} "1.1" > 0 {code} returns *true* in 3.3. But it throws an exception in 3.4.0. {code:java} java.lang.ArithmeticException: Object comparison:(1.1 GT 0) at org.apache.commons.jexl3.JexlArithmetic.doCompare(JexlArithmetic.java:806) at org.apache.commons.jexl3.JexlArithmetic.compare(JexlArithmetic.java:503) at org.apache.commons.jexl3.JexlArithmetic.greaterThan(JexlArithmetic.java:892) at org.apache.commons.jexl3.internal.Interpreter.visit(Interpreter.java:1448) at org.apache.commons.jexl3.parser.ASTGTNode.jjtAccept(ASTGTNode.java:19) at org.apache.commons.jexl3.internal.Interpreter.visit(Interpreter.java:1532) at org.apache.commons.jexl3.parser.ASTJexlScript.jjtAccept(ASTJexlScript.java:137) at org.apache.commons.jexl3.internal.Interpreter.interpret(Interpreter.java:843) at org.apache.commons.jexl3.internal.Script.execute(Script.java:239) {code} {*}Regression #2{*}: {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. > Regressions in 3.4.0 > -------------------- > > 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 > > {*}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)