You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (JIRA)" <ji...@apache.org> on 2018/07/27 11:42:00 UTC

[jira] [Resolved] (AMQ-7017) ProducerBrokerExchange.getPercentageBlocked() throws ArithmeticException (divide by zero)

     [ https://issues.apache.org/jira/browse/AMQ-7017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher L. Shannon resolved AMQ-7017.
-----------------------------------------
    Resolution: Fixed

> ProducerBrokerExchange.getPercentageBlocked() throws ArithmeticException (divide by zero)
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-7017
>                 URL: https://issues.apache.org/jira/browse/AMQ-7017
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.15.4
>            Reporter: Matthew Stratton
>            Assignee: Christopher L. Shannon
>            Priority: Trivial
>              Labels: patch
>             Fix For: 5.16.0, 5.15.5
>
>         Attachments: fix-producer-exchange-divide-by-zero.txt
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)