Description of problem: When query, which returns events from some entry-point, is defined in drl file and no events are inserted into entry point, NPE is thrown. Empty result should be return in cases when no event is in entry-point, or when there are some events, which don't meet the conditions of query. Version-Release number of selected component (if applicable): Drools 6.0.0-SNAPSHOT Drools 6.0.0.ER4 How reproducible: Pull request #269 submited in Drools. Steps to Reproduce: 1. Write a drl file with one query which should return events from some entry-point. 2. Write a test with one kieSession. Don't insert any event into entry-point. 3. Run test. Actual results: NullPointerException is thrown. Expected results: getQueryResults() should return empty result (results.size() == 0). Additional info:
NPE problem appeared in some test which should return some result. Example added to pull request.
Fixed. Thanks. 6.0.x: http://github.com/droolsjbpm/drools/commit/315cc8f4b master: http://github.com/droolsjbpm/drools/commit/5151d011c
Verified on BRMS 6.0.0.ER5.