hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shreyas Dube (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1413) Divide by Zero error in FutureRequestExecutionMetrics
Date Fri, 04 Oct 2013 19:51:41 GMT
Shreyas Dube created HTTPCLIENT-1413:
----------------------------------------

             Summary: Divide by Zero error in FutureRequestExecutionMetrics
                 Key: HTTPCLIENT-1413
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1413
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.3 Final
            Reporter: Shreyas Dube
            Priority: Critical


There is a divide by zero error in the org.apache.http.impl.client.FutureRequestExecutionMetrics.DurationCounter::averageDuration()
method. 

{code}
        public long averageDuration() {
            final long counter = count.get();
            return cumulativeDuration.get() / counter;    // / by 0 if counter is 0
        }
{code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message