]
Mario Fusco resolved DROOLS-2391.
---------------------------------
Resolution: Done
Fixed in mvel 2.4.1 with
Cannot compare int's division result to double
----------------------------------------------
Key: DROOLS-2391
URL:
https://issues.jboss.org/browse/DROOLS-2391
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.4.1.Final
Reporter: Viacheslav Krot
Assignee: Luca Molteni
I guess this is a bug - division of int fields in when part cannot be compared to
double.
For example with class A having two int fields following rule does not work
when
$a: A(a == 1, b == 2, a / b < 0.99)
but this works:
when
$a: A(a == 1, b == 2, a / b < 1.0)
Result of same expresson printed to output - System.out.println($a.a / $a.b) gives
correct result of type Double.
Why does it not work in when part?