Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1413

Divide by Zero error in FutureRequestExecutionMetrics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3 Final
    • 4.3.2
    • HttpClient (classic)
    • None

    Description

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

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            shreyasdube Shreyas Dube
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: