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

[OSGi] WeakList needs to support "clear" method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.5.2, 5.0 Alpha1
    • 4.5.3, 5.0 Alpha2
    • HttpClient (classic)
    • None

    Description

      The WeakList implementation introduced in HTTPCLIENT-1749 does not currently implement the close() method.

      However, HttpProxyConfigurationActivator calls this method when the OSGi bundle is stopped, leading to an exception being thrown.

      org.osgi.framework.BundleException: Activator stop error in bundle org.apache.httpcomponents.httpclient [122].
              at org.apache.felix.framework.Felix.stopBundle(Felix.java:2663)
              at org.apache.felix.framework.Felix.updateBundle(Felix.java:2341)
              at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:995)
              at org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:60)
              at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.doRun(BaseUpdateInstallHelper.java:93)
              at org.apache.felix.webconsole.internal.core.UpdateHelper.doRun(UpdateHelper.java:70)
              at org.apache.felix.webconsole.internal.core.BaseUpdateInstallHelper.run(BaseUpdateInstallHelper.java:123)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.UnsupportedOperationException: null
              at java.util.AbstractList.remove(AbstractList.java:161)
              at java.util.AbstractList$Itr.remove(AbstractList.java:374)
              at java.util.AbstractList.removeRange(AbstractList.java:571)
              at java.util.AbstractList.clear(AbstractList.java:234)
              at org.apache.http.osgi.impl.HttpProxyConfigurationActivator.stop(HttpProxyConfigurationActivator.java:140)
              at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:719)
              at org.apache.felix.framework.Felix.stopBundle(Felix.java:2607)
              ... 7 common frames omitted
      

      Attachments

        1. HTTPCLIENT-1772-jsedding.patch
          2 kB
          Julian Sedding

        Activity

          People

            jsedding Julian Sedding
            jsedding Julian Sedding
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: