-
Bug
-
Resolution: Done
-
Major
-
None
-
7.10.0.Final
-
2018 Week 33-35
-
- See Unit test PR
-
NEW
-
NEW
For a constraint like "age > ((2*$age1)/3) ", Mvel Jitting generates a class like:
public class ConditionEvaluator251ed544c9124e1d99d3a8cae5048e1a implements ConditionEvaluator { public boolean evaluate(InternalFactHandle internalfacthandle, InternalWorkingMemory internalworkingmemory, Tuple tuple) { Tuple tuple1 = tuple; int i = declarations[0].getIntValue(internalworkingmemory, tuple1.getFactHandle().getObject()); return ((Person)internalfacthandle.getObject()).getAge() > 2 * i * 3; } public ConditionEvaluator251ed544c9124e1d99d3a8cae5048e1a(Declaration adeclaration[]) { declarations = adeclaration; } private static final String EXPRESSION = "age > ((2*$age1)/3)"; private final Declaration declarations[]; }
The division is wrongly generated like "getAge() > 2 * i * 3".
- is incorporated by
-
RHDM-720 Wrong division calculation in Mvel Jitted constraint
- Closed