[jboss-jira] [JBoss JIRA] Created: (JBRULES-3003) restriction evaluation returns 'false' for "trueField != falseField"

Wolfgang Laun (JIRA) jira-events at lists.jboss.org
Thu Apr 28 04:27:18 EDT 2011


restriction evaluation returns 'false' for "trueField != falseField"
--------------------------------------------------------------------

                 Key: JBRULES-3003
                 URL: https://issues.jboss.org/browse/JBRULES-3003
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler (expert)
    Affects Versions: 5.2.0.M2
            Reporter: Wolfgang Laun
            Assignee: Mark Proctor
            Priority: Critical
             Fix For: 5.2.0.CR1


Comparing two boolean fields using != appears to return always false

public class Customer {
    boolean tenthSaleFree = true;
    boolean goldCard = false;
    // ...
}

With some customers containing boolean fields as initialized:

rule this_does_not_fire
when
    $c: Customer( tenthSaleFree != goldCard )
then
end

rule this_works
when
    Customer( tenthSaleFree == ( ! goldCard ) )
then
end

 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list