[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2113) NPE thrown by LeftTuple.get() method

Mark Proctor (JIRA) jira-events at lists.jboss.org
Wed Apr 7 18:06:38 EDT 2010


    [ https://jira.jboss.org/jira/browse/JBRULES-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12524406#action_12524406 ] 

Mark Proctor commented on JBRULES-2113:
---------------------------------------

if you have unbalanced bindings like that you get unbalanced rules, which is impossible to execute on in the consequence. There isn't any magical way to make this work, other than possibly not allow it and make it blow up at build time.

Tom, have you recreated this another way, or think it was also related to unalanced use of 'or' pattern bindings?

> NPE thrown by LeftTuple.get() method
> ------------------------------------
>
>                 Key: JBRULES-2113
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-2113
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.0.0.CR1
>         Environment: FOund in 5.0.0.CR1 - Community version. Windows XP
>            Reporter: Tom Murphy
>            Assignee: Mark Proctor
>
> the get() method on LeftTuple throws a null exception under certain circumstances, which are as yet undetermined.
> Here is the Code:
> public InternalFactHandle get(final int index) {
>         LeftTuple entry = this;
>         while ( entry.index != index ) {
>             entry = entry.parent;
>         }
>         return entry.handle;
>     }
> Note that the loop moves to each parent in succession, but never checks for entry != null. If it does get to the end of the chain, it will throw an NPE

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

        


More information about the jboss-jira mailing list