Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-530

Potential NPE in JmsSession consumerClosed()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.56.0
    • 0.58.0
    • None
    • None

    Description

      In the following code (JMSSession line 416), if consumer is null this throws a NPE and the consumer never recovers:

              JmsMessageConsumer consumer = consumers.get(resource.getId());
              if (consumer.hasMessageListener()) {
                  connection.onAsyncException(JmsExceptionSupport.create(cause));
              }
      
              try {
                  if (consumer != null) {
                      consumer.shutdown(cause);
                  }
      

      Happy to raise a PR myself for this (just ask) but I have had to fix it locally.

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            indysilver David Martin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: