You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Lauri Lehtinen <la...@gmail.com> on 2011/12/19 21:42:33 UTC

Changes in HTTPSampler2 method signatures

Hello,

A custom sampler we've been using extends HTTPSampler2. I started looking
into why it no longer worked with JMeter 2.5.1, 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 is passing in. The method
implementations themselves, however, seem to delegate to methods that in
their turn accept any HttpMethod.

Examples are these methods: setupConnection, saveConnectionCookies,
getResponseHeaders, getConnectionHeaders.

Was there some reason for this backwards incompatible change that I fail to
see?

Regards,

Lauri

Re: Changes in HTTPSampler2 method signatures

Posted by sebb <se...@gmail.com>.
On 20 December 2011 03:47, Lauri Lehtinen <la...@gmail.com> wrote:
> On Mon, Dec 19, 2011 at 8:17 PM, sebb <se...@gmail.com> wrote:
>
>> On 19 December 2011 20:42, Lauri Lehtinen <la...@gmail.com>
>> wrote:
>> > Hello,
>> >
>> > A custom sampler we've been using extends HTTPSampler2. I started looking
>> > into why it no longer worked with JMeter 2.5.1, 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 is passing in. The method
>> > implementations themselves, however, seem to delegate to methods that in
>> > their turn accept any HttpMethod.
>> >
>> > Examples are these methods: setupConnection, saveConnectionCookies,
>> > getResponseHeaders, getConnectionHeaders.
>> >
>> > Was there some reason for this backwards incompatible change that I fail
>> to
>> > see?
>>
>> It was probably a mistake.
>>
>> Feel free to raise a Bugzilla issue for it.
>>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=52371

Should now be fixed in the current SVN code.

> Thanks

Re: Changes in HTTPSampler2 method signatures

Posted by sebb <se...@gmail.com>.
On 20 December 2011 03:47, Lauri Lehtinen <la...@gmail.com> wrote:
> On Mon, Dec 19, 2011 at 8:17 PM, sebb <se...@gmail.com> wrote:
>
>> On 19 December 2011 20:42, Lauri Lehtinen <la...@gmail.com>
>> wrote:
>> > Hello,
>> >
>> > A custom sampler we've been using extends HTTPSampler2. I started looking
>> > into why it no longer worked with JMeter 2.5.1, 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 is passing in. The method
>> > implementations themselves, however, seem to delegate to methods that in
>> > their turn accept any HttpMethod.
>> >
>> > Examples are these methods: setupConnection, saveConnectionCookies,
>> > getResponseHeaders, getConnectionHeaders.
>> >
>> > Was there some reason for this backwards incompatible change that I fail
>> to
>> > see?
>>
>> It was probably a mistake.
>>
>> Feel free to raise a Bugzilla issue for it.
>>
>> https://issues.apache.org/bugzilla/show_bug.cgi?id=52371

Should now be fixed in the current SVN code.

> Thanks

Re: Changes in HTTPSampler2 method signatures

Posted by Lauri Lehtinen <la...@gmail.com>.
On Mon, Dec 19, 2011 at 8:17 PM, sebb <se...@gmail.com> wrote:

> On 19 December 2011 20:42, Lauri Lehtinen <la...@gmail.com>
> wrote:
> > Hello,
> >
> > A custom sampler we've been using extends HTTPSampler2. I started looking
> > into why it no longer worked with JMeter 2.5.1, 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 is passing in. The method
> > implementations themselves, however, seem to delegate to methods that in
> > their turn accept any HttpMethod.
> >
> > Examples are these methods: setupConnection, saveConnectionCookies,
> > getResponseHeaders, getConnectionHeaders.
> >
> > Was there some reason for this backwards incompatible change that I fail
> to
> > see?
>
> It was probably a mistake.
>
> Feel free to raise a Bugzilla issue for it.
>
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52371

Thanks

Re: Changes in HTTPSampler2 method signatures

Posted by sebb <se...@gmail.com>.
On 19 December 2011 20:42, Lauri Lehtinen <la...@gmail.com> wrote:
> Hello,
>
> A custom sampler we've been using extends HTTPSampler2. I started looking
> into why it no longer worked with JMeter 2.5.1, 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 is passing in. The method
> implementations themselves, however, seem to delegate to methods that in
> their turn accept any HttpMethod.
>
> Examples are these methods: setupConnection, saveConnectionCookies,
> getResponseHeaders, getConnectionHeaders.
>
> Was there some reason for this backwards incompatible change that I fail to
> see?

It was probably a mistake.

Feel free to raise a Bugzilla issue for it.

> Regards,
>
> Lauri