Affects: 5.2.23
Hi
Today I faced with the following problem: ternary operator loses parenthesis after I call .toStringAST(). I implemented the test reproducing the bug:
var spelExpressionParser = new SpelExpressionParser();
var expression = (SpelExpression) spelExpressionParser.parseExpression("(a ? 1 : 0) * 10");
assertEquals("((a ? 1 : 0) * 10)", expression.getAST().toStringAST());
And it fails with the error
org.opentest4j.AssertionFailedError: expected: <((a ? 1 : 0) * 10)> but was: <(a ? 1 : 0 * 10)>
In fact, the actual expression is different since it multiplies 0 to 10 first and then applies ternary operator
Affects: 5.2.23
Hi
Today I faced with the following problem: ternary operator loses parenthesis after I call
.toStringAST(). I implemented the test reproducing the bug:And it fails with the error
In fact, the actual expression is different since it multiplies 0 to 10 first and then applies ternary operator