HttpComponents HttpClient
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1157

MemcachedHttpCacheStorage should throw IOExceptions instead of Runtime Exceptions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2 Alpha1
    • Fix Version/s: 4.1.3, 4.2 Beta1
    • Component/s: HttpCache
    • Labels:

      Description

      The MemcachedHttpCacheStorage class implements HttpCacheStorage which defines that methods will throw IOExceptions, but the underlying net.spy.memcached.MemcachedClientIF throws runtime exceptions. These exceptions are not caught in the code where IOExceptions are expected causing these exception bubble up to the calling code. It seems like the MemcachedHttpCacheStorage class should treat at least some of these runtime exceptions as IOExceptions so that normal code execution paths can be followed.

      I'm proposing that MemcachedHttpCacheStorage treat a OperationTimeoutException from the memcached client as an IOException. This would allow the existing CachingHttpClient code to catch and log the exception as a warning, instead of bubbling the exception up the calling code.

      1. HTTPCLIENT-1157.patch
        10 kB
        James Miller
      2. httpclient-1157-2.patch
        6 kB
        James Miller

        Activity

          People

          • Assignee:
            Jon Moore
            Reporter:
            James Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development