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.
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
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2689