[jboss-jira] [JBoss JIRA] (JBRULES-3421) FireAllRulesCommand NPE when outIdentifier != null

Mario Fusco (JIRA) jira-events at lists.jboss.org
Mon Mar 19 04:44:47 EDT 2012


     [ https://issues.jboss.org/browse/JBRULES-3421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco reassigned JBRULES-3421:
------------------------------------

    Assignee: Mario Fusco  (was: Mark Proctor)

    
> 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: Mario Fusco
>            Priority: Minor
>             Fix For: 5.4.0.CR1
>
>         Attachments: FireAllRulesCommandTest.java
>
>
> See mailing list post for full details: http://drools.46999.n3.nabble.com/rules-users-NPE-in-FireAllRulesCommand-bug-td3794424.html
> 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: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list