You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With version 3.1.0, the boolean expression evaluation was broken. It seems that the problem takes effect only when scale of the BigDecimal is greater than zero.
Example (correct result) with scale 0:
Expression expression = new Expression("a && b");
EvaluationValue result = expression
.with("a", BigDecimal.ZERO)
.and("b", BigDecimal.ZERO)
.evaluate();
System.out.println(result.getBooleanValue()); // prints false
Example (wrong result) with scale 1:
Expression expression = new Expression("a && b");
EvaluationValue result = expression
.with("a", new BigDecimal("0.0"))
.and("b", new BigDecimal("0.0"))
.evaluate();
System.out.println(result.getBooleanValue()); // prints true
The text was updated successfully, but these errors were encountered:
Adler95
changed the title
Broken boolean expression evaluation in 3.1.0 version
Broken boolean expression evaluation in version 3.1.0
Feb 15, 2024
With version 3.1.0, the boolean expression evaluation was broken. It seems that the problem takes effect only when scale of the BigDecimal is greater than zero.
Example (correct result) with scale 0:
Example (wrong result) with scale 1:
The text was updated successfully, but these errors were encountered: