[jboss-jira] [JBoss JIRA] (DROOLS-4334) Type coercion with Map.get() after jitting
Mario Fusco (Jira)
issues at jboss.org
Thu Jul 18 02:31:00 EDT 2019
[ https://issues.jboss.org/browse/DROOLS-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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).
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list