[jboss-jira] [JBoss JIRA] (DROOLS-2391) Cannot compare int's division result to double

Viacheslav Krot (JIRA) issues at jboss.org
Thu Mar 15 13:21:00 EDT 2018


Viacheslav Krot created DROOLS-2391:
---------------------------------------

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


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?




--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list