[jboss-jira] [JBoss JIRA] Created: (JBRULES-1567) ArrayIndexOutOfBoundsException in sequential execution after calling RuleBase.addPackage(..)
Ming Jin (JIRA)
jira-events at lists.jboss.org
Wed Apr 16 20:20:44 EDT 2008
ArrayIndexOutOfBoundsException in sequential execution after calling RuleBase.addPackage(..)
--------------------------------------------------------------------------------------------
Key: JBRULES-1567
URL: http://jira.jboss.com/jira/browse/JBRULES-1567
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 5.0.0-M1
Environment: All
Reporter: Ming Jin
Assigned To: Ming Jin
Priority: Minor
Fix For: 5.0.0-M1
ArrayIndexOutOfBoundsException would been thrown after the following steps:
1. Create a rulebase with sequential set to true.
2. Add a package to rulebase, execute the rules. The first execution would be successful.
3. Add another package to the same rulebase, then execute the rules. An ArrayIndexOutOfBoundsException would been thrown as the followings:
java.lang.ArrayIndexOutOfBoundsException: -1
at org.drools.common.ArrayAgendaGroup.add(ArrayAgendaGroup.java:140)
at org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:309)
Sequential execution requires to set order before execution. Since the second addPackage call does not reset the "ordered" flag in ReteooRuleBase, the order was not correctly set for the newly added package.
--
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