[jboss-jira] [JBoss JIRA] (DROOLS-4334) Type coercion with Map.get() after jitting

Toshiya Kobayashi (Jira) issues at jboss.org
Thu Jul 18 00:36:00 EDT 2019


Toshiya Kobayashi created DROOLS-4334:
-----------------------------------------

             Summary: 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


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).



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list