[jboss-jira] [JBoss JIRA] Closed: (JBRULES-794) ArrayIndexOutOfBoundException if duplicate declarations in rule

Mark Proctor (JIRA) jira-events at lists.jboss.org
Wed Jul 4 20:44:55 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-794?page=all ]

Mark Proctor closed JBRULES-794.
--------------------------------

    Resolution: Out of Date

we won't be fixing this in 3.0. In 4.0 you cannot use a declaration twice, it should blow up at build time. Reopen this if I'm wrong.

> ArrayIndexOutOfBoundException if duplicate declarations in rule
> ---------------------------------------------------------------
>
>                 Key: JBRULES-794
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-794
>             Project: JBoss Rules
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.0.6
>            Reporter: Juergen none
>         Assigned To: Edson Tirelli
>            Priority: Minor
>             Fix For:  4.0.0.MR4
>
>
> rule "yields-out-of-bound-exception"
>  when
>   a : A(
>    b : b
>   )
>   C(b == b,
>    n : n // FIRST DECLARATION
>   )
>   n : D(self == n) //SECOND DECLARATION
> hen ...
> valid rule file, rule is parsed, but yields exception
> corrected (remove second declaration):
> ...
>   C(b == b,
>    n : n // FIRST DECLARATION
>   )
>   D(self == n)
> then ...
> valid rule file, rule is parsed, no exception
> Exception stacktrace fragment:
> java.lang.ArrayIndexOutOfBoundsException: 2
> 	at org.drools.reteoo.FactHandleList.get(FactHandleList.java:114)
> 	at org.drools.reteoo.TupleKey.get(TupleKey.java:98)
> 	at org.drools.reteoo.ReteTuple.get(ReteTuple.java:160)
> 	at org.drools.reteoo.ReteTuple.get(ReteTuple.java:167)
> 	at org.drools.rule.BoundVariableConstraint.isAllowed(BoundVariableConstraint.java:79)
> 	at org.drools.common.BetaNodeBinder.isAllowed(BetaNodeBinder.java:63)
> 	at org.drools.reteoo.TupleSource.attemptJoin(TupleSource.java:99)
> 	at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:166)
> 	at org.drools.reteoo.ObjectSource.propagateAssertObject(ObjectSource.java:119)
> 	at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:158)
> 	at org.drools.reteoo.Rete.assertObject(Rete.java:120)
> 	at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:180)
> 	at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
> 	at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:537)
> 	at org.drools.base.DefaultKnowledgeHelper.assertLogicalObject(DefaultKnowledgeHelper.java:70)
> 	at org.drools.base.DefaultKnowledgeHelper.assertLogicalObject(DefaultKnowledgeHelper.java:64)
> 	at Rule_assert_Child_from_TreeNodeIF_0.consequence(Rule_assert_Child_from_TreeNodeIF_0.java:65)

-- 
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