Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3166

Possible method call on null object in QueueImpl class

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.1.0.DR8
    • 7.0.0.ER4
    • ActiveMQ
    • None

    Description

      Static code analysis tool discovered possible issue in class QueueImpl.

      Following is affected part of code, starting on line number 2461 in method

      public void postAcknowledge(final MessageReference ref) {code:java}
      
      {code:java}
            boolean durableRef = message != null && message.isDurable() && queue.durable;         \\line 2461
      
            try {
               message.decrementRefCount();                                                       \\line 2464
            }
            catch (Exception e) {
               ActiveMQServerLogger.LOGGER.errorDecrementingRefCount(e);
            }
      

      Line 2461 contains check for null message. That implies that message might be null. In following try block, line 2464 message contains method call on this message object.

      Attachments

        Issue Links

          Activity

            People

              fedor.gavrilov Fedor Gavrilov (Inactive)
              mstyk_jira Martin Styk (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: