Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341262 - org.apache.htpcomponents.httpclient 4.1 bundle needs additional package import
Summary: org.apache.htpcomponents.httpclient 4.1 bundle needs additional package import
Status: RESOLVED FIXED
Alias: None
Product: Orbit
Classification: Tools
Component: bundles (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: Indigo M7   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 13:27 EDT by Shawn Minto CLA
Modified: 2012-01-03 10:36 EST (History)
2 users (show)

See Also:


Attachments
patch (736 bytes, patch)
2011-03-29 13:28 EDT, Shawn Minto CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Minto CLA 2011-03-29 13:27:44 EDT
There seem to be 2 things that need to be added to the manifests so that clients can use the new httpclient 4.1 bundle.  First, a dependency is needed on org.apach.commons.codec so that the Base64 class can be used.  Next, a buddy policy is required so that clients of this bundle can provide custom implementations of some classes for customization of the behavior.  With httpclient, these customizations are registered as class name strings from the client bundle which are then instantiated when needed by the httpclient bundle, so the buddy policy needs to be used to ensure that it can load classes from the client bundle.
Comment 1 Shawn Minto CLA 2011-03-29 13:28:19 EDT
Created attachment 192114 [details]
patch

Here is a simple patch.
Comment 2 Chris Aniszczyk CLA 2011-03-29 13:31:09 EDT
I'll look at this tonight.
Comment 3 Chris Aniszczyk CLA 2011-03-30 11:20:27 EDT
We will be updating to 4.1.1 very soon, see bug 341311.

I'll make this fix then. Is that OK?
Comment 4 Shawn Minto CLA 2011-03-30 12:52:20 EDT
What is the timeframe for this update (having it in cvs and having a build of it)?
Comment 5 Shawn Minto CLA 2011-03-30 19:24:43 EDT
can we get the codec addition so that we can move forward with some work on this front?  we will investigate if the buddy policy is actually needed to make this work.
Comment 6 Steffen Pingel CLA 2011-03-30 20:47:04 EDT
Chris, can we make the trivial change to add the missing dependency now since that blocks using the library (we can work around the buddy policy)?
Comment 7 Chris Aniszczyk CLA 2011-03-31 14:21:46 EDT
I updated it to use an Import-Package to get the Base64 class... but man... that's crazy since they used BND to generate the MANIFEST.MF and generated a faulty one... let me know if that works now.

I'm suspicious of the need for a Buddy Policy though...
Comment 8 Shawn Minto CLA 2011-03-31 17:42:56 EDT
Thanks Chris!  Will let you know about the buddy-policy and if this package import works.
Comment 9 Steffen Pingel CLA 2012-01-03 10:36:57 EST
It turns out that overriding AbstractHttpClient.createClientConnectionManager() makes a buddy-policy unnecessary. Given the potential headaches that buddy-policies tend to cause I believe we are better off leaving it out. 

I have updated the summary accordingly and will mark this as resolved since the missing package import has been added.