NPE thrown by LeftTuple.get() method
------------------------------------
Key: JBRULES-2113
URL:
https://jira.jboss.org/jira/browse/JBRULES-2113
Project: JBoss 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