Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-717

NPE when opening a live query with null parameters

    XMLWordPrintable

Details

    • CR1
    • Hide

      Please run the test org.drools.compiler.integrationtests.QueryTest#testOpenQueryNoParams() from the attached PR.

      Show
      Please run the test org.drools.compiler.integrationtests.QueryTest#testOpenQueryNoParams() from the attached PR.
    • 2018 Week 33-35

    Description

      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.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mwinkler@redhat.com Marek Winkler
            Tibor Zimanyi Tibor Zimanyi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: