[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1091) NullPointerException when the 'result' block of an 'accumulate' function returns null
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Thu Aug 23 18:20:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1091?page=all ]
Edson Tirelli closed JBRULES-1091.
----------------------------------
Resolution: Done
Ok, I added integration tests and null handling code in accumulate. Now if accumulate ever returns a null value, it will raise a RuntimeDroolsException with appropriate message.
Thanks for reporting.
> NullPointerException when the 'result' block of an 'accumulate' function returns null
> -------------------------------------------------------------------------------------
>
> Key: JBRULES-1091
> URL: http://jira.jboss.com/jira/browse/JBRULES-1091
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Reteoo
> Affects Versions: 4.0.0.GA
> Reporter: Alexandre Gattiker
> Assigned To: Edson Tirelli
> Fix For: 4.0.1
>
>
> java.lang.NullPointerException
> at org.drools.common.DefaultFactHandle.<init>(DefaultFactHandle.java:73)
> at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:34)
> at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:57)
> at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:48)
> at org.drools.reteoo.AccumulateNode.assertTuple(AccumulateNode.java:176)
> at org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
> at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:131)
> at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
> at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
> at org.drools.reteoo.Rete.assertObject(Rete.java:168)
> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
> at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:163)
> at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1241)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:623)
> at com.sample.DroolsTest.main(DroolsTest.java:28)
> Example rule:
> rule "Example"
> no-loop true
> when
> $d: Double()
> from accumulate ( m : Message( $value: status ),
> init( double total = 0; ),
> action( System.out.println($value); ),
> result( null )
> )
> then
> System.out.println( "xx");
>
> end
--
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