-
Bug
-
Resolution: Done
-
Major
-
7.1.0.GA
When opening a live query via KieSession.openLiveQuery(query, params, listener), where params == null, the following NPE is thrown:
java.lang.NullPointerException at org.drools.core.impl.StatefulKnowledgeSessionImpl$ExecuteQuery.execute(StatefulKnowledgeSessionImpl.java:907) at org.drools.core.phreak.SynchronizedPropagationList$1.execute(SynchronizedPropagationList.java:53) at org.drools.core.common.DefaultAgenda.executeTask(DefaultAgenda.java:1164) at org.drools.core.phreak.SynchronizedPropagationList.addEntry(SynchronizedPropagationList.java:47) at org.drools.core.common.DefaultAgenda.addPropagation(DefaultAgenda.java:1260) at org.drools.core.impl.StatefulKnowledgeSessionImpl.addPropagation(StatefulKnowledgeSessionImpl.java:2055) at org.drools.core.impl.StatefulKnowledgeSessionImpl.evalQuery(StatefulKnowledgeSessionImpl.java:878) at org.drools.core.impl.StatefulKnowledgeSessionImpl.openLiveQuery(StatefulKnowledgeSessionImpl.java:866) at org.drools.compiler.integrationtests.QueryTest.testOpenQueryNoParams(QueryTest.java:971) ...
The test passes if the query is opened with an empty array, params == new Object[] {}.
This behavior is different from RHDM/RHPAM 7.0, is it an intended change, or a regression? If it is intended, we should probably provide a more specific error message to the user.