Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-7017

ProducerBrokerExchange.getPercentageBlocked() throws ArithmeticException (divide by zero)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 5.15.4
    • 5.15.5, 5.16.0
    • Broker
    • Patch Available
    • Patch

    Description

      I found this when testing a broker plugin for tracking messages sent (including some stats like getPercentageBlocked). When there have been no blocked messages an ArithmeticException is thrown due to an unchecked divide by zero. 

      I fixed it and added a couple unit tests.

      Attachments

        Activity

          People

            cshannon Christopher L. Shannon
            mstratto Matthew Stratton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: