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

PoolingHttpClientConnectionManager thread safety

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.3.2
    • 4.3.3
    • HttpClient (classic)
    • None
    • Windows 8.1 x64
      java version "1.7.0_45"
      Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

    Description

      Although the PoolingHttpClientConnectionManager is marked as ThreadSafe, connectionManager.closeExpiredConnections() call from multiple threads causes ConcurrentModificationException.

      java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:839)
      at java.util.HashMap$EntryIterator.next(HashMap.java:880)
      at java.util.HashMap$EntryIterator.next(HashMap.java:878)
      at org.apache.http.pool.AbstractConnPool.purgePoolMap(AbstractConnPool.java:469)
      at org.apache.http.pool.AbstractConnPool.closeExpired(AbstractConnPool.java:517)
      at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.closeExpiredConnections(PoolingHttpClientConnectionManager.java:363)
      at com.jyvee.shared.http.HttpHelper.getHttpClient(HttpHelper.java:121)

      Attachments

        Activity

          People

            Unassigned Unassigned
            rahim.alizada Rahim Alizada
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: