[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2113) NPE thrown by LeftTuple.get() method
M D (JIRA)
jira-events at lists.jboss.org
Mon Dec 28 20:08:31 EST 2009
[ https://jira.jboss.org/jira/browse/JBRULES-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12501711#action_12501711 ]
M D commented on JBRULES-2113:
------------------------------
I ran in to this when I used "or with binding" similar to the one below:
(or pensioner : Person( sex == "f", age > 60 )
address : Address( zip == "12345" ) )
Version: 5.1.0M1
> 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