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

Potential NPE in JmsSession consumerClosed()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.56.0
    • Fix Version/s: 0.58.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: