]
Mike Melton commented on JBRULES-3421:
--------------------------------------
Pull request:
FireAllRulesCommand NPE when outIdentifier != null
--------------------------------------------------
Key: JBRULES-3421
URL:
https://issues.jboss.org/browse/JBRULES-3421
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.3.1.Final, 5.4.0.Beta1
Reporter: Mike Melton
Assignee: Mark Proctor
Priority: Minor
Attachments: FireAllRulesCommandTest.java
See mailing list post for full details:
http://drools.46999.n3.nabble.com/rules-users-NPE-in-FireAllRulesCommand-...
The short version is that if you execute a BatchExecutionCommand containing a
FireAllRulesCommand which itself has a non-null outIdentifier, a NPE is thrown due to the
expression "(ExecutionResultImpl) ((KnowledgeCommandContext)
context).getExecutionResults()" returning null. This is because the context object
which is passed into the execute method contains a null results object.
I have written unit tests demonstrating the problem and have coded a fix which differs
from my suggestion in the mailing list post in that it is confined to
FireAllRulesCommand.java (i.e., it doesn't touch StatelessKnowledgeSessionImpl.java).
I will attach a basic unit test to this issue and submit a pull request with both more
thorough tests and the fix.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: