]
Mario Fusco updated DROOLS-4334:
--------------------------------
Sprint: 2019 Week 29-31
Type coercion with Map.get() after jitting
------------------------------------------
Key: DROOLS-4334
URL:
https://issues.jboss.org/browse/DROOLS-4334
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.24.0.Final
Reporter: Toshiya Kobayashi
Assignee: Mario Fusco
Priority: Major
Labels: support
When comparing an Integer taken from Map.get() with a String, Mvel coerces the type so
they are compared as Integers.
For example, here $map.get("key") returns Integer 5, $status is String
"10". So it doesn't match (expected).
{noformat}
rule R when
FactWithMap( $map : valueMap )
Person( $status : status, $map.get("key") >= $status)
then
end
{noformat}
However, after jitting, the constraint is evaluated as true so the rule is fired
(unexpected).