Bug 52371

Summary: API Incompatibility :Methods in HTTPSampler2 now require PostMethod instead of HttpMethodBase
Product: JMeter - Now in Github Reporter: Lauri Lehtinen <lauri.h.lehtinen>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: regression CC: p.mouawad
Priority: P2    
Version: 2.5.1   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Lauri Lehtinen 2011-12-20 03:46:00 UTC
A custom sampler we've been using extends HTTPSampler2. I started looking into why it no longer worked with JMeter 2.5.1 (I upgraded from 2.4, so this may have been introduced in 2.5), and tracked it down to some changes in the super class (HTTPSampler2).

A closer look revealed that in several cases, the method signatures changed, and now require a PostMethod instead of HttpMethodBase which our sampler needs to be able to pass in. The method implementations themselves in HTTPSampler2, however, seem to delegate to methods that in their turn accept any HttpMethod.

Examples are these methods: setupConnection, saveConnectionCookies, getResponseHeaders, getConnectionHeaders.
Comment 1 Sebb 2011-12-20 11:56:45 UTC
Thanks for the report; now fixed. Reverted to HttpMethod interface except for setUpConnection which requires the HttpMethodBase abstract class.

URL: http://svn.apache.org/viewvc?rev=1221212&view=rev
Log:
Bug 52371 - API Incompatibility - Methods in HTTPSampler2 now require PostMethod instead of HttpMethod[Base]. Reverted to original types.

Modified:
   jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
   jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:37:48 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2689