[jboss-jira] [JBoss JIRA] Created: (JBRULES-798) CLONE -null pointer with number comparison..

Sanjay Mahurpawar (JIRA) jira-events at lists.jboss.org
Mon Apr 16 02:28:58 EDT 2007


CLONE -null pointer with number comparison..
--------------------------------------------

                 Key: JBRULES-798
                 URL: http://jira.jboss.com/jira/browse/JBRULES-798
             Project: JBoss Rules
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: 3.0.4
         Environment: Windows XP or Solaris
Sun JDK 1.4.2
Drools 3.0.4 distribution
            Reporter: Sanjay Mahurpawar
         Assigned To: Mark Proctor


getting a null pointer while asserting fact:

Caused by: java.lang.NullPointerException
	at org.drools.base.evaluators.IntegerFactory$IntegerGreaterEvaluator.evaluate(Unknown Source)
	at org.drools.rule.BoundVariableConstraint.isAllowed(Unknown Source)
	at org.drools.common.BetaNodeBinder.isAllowed(Unknown Source)
	at org.drools.reteoo.TupleSource.attemptJoin(Unknown Source)
	at org.drools.reteoo.JoinNode.assertTuple(Unknown Source)
	at org.drools.reteoo.LeftInputAdapterNode.createAndAssertTuple(Unknown Source)
	at org.drools.reteoo.LeftInputAdapterNode.assertObject(Unknown Source)
	at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
	at org.drools.reteoo.ObjectTypeNode.assertObject(Unknown Source)
	at org.drools.reteoo.Rete.assertObject(Unknown Source)
	at org.drools.reteoo.ReteooRuleBase.assertObject(Unknown Source)
	at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(Unknown Source)
	at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
	at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)


Rule is something like this:
rule "Greater Than with NULL number!!"
when
    MyFact ( integerAttribute > 10 )
then
   .....
end

the *intergerAttribute* is of type java.lang.Integer and value is *null*.
no such problem if expression changed to *integerAttribute == 10* or !=


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list