Hello,
For following rule, NullPointerException is thrown for null id in 4.x. is
this expected? Please clarify.
Foo{
Integer id;
}
Rule "null check"
foo : Foo(id==null)
then
end
stack trace:
java.lang.NullPointerException
at
org.drools.base.extractors.BaseObjectClassFieldExtractor.getIntValue(BaseObjectClassFieldExtractor.java:95)
at
org.drools.base.ClassFieldExtractor.getIntValue(ClassFieldExtractor.java:197)
at
org.drools.base.evaluators.IntegerFactory$IntegerLessEvaluator.evaluate(IntegerFactory.java:241)
at
org.drools.rule.VariableRestriction.isAllowed(VariableRestriction.java:73)
at org.drools.rule.VariableConstraint.isAllowed(VariableConstraint.java:67)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
at
org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:160)
--
View this message in context:
http://www.nabble.com/NullPointerException-for-Integer-null-tp23286041p23...
Sent from the drools - user mailing list archive at
Nabble.com.