You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2015/12/30 17:38:35 UTC

setSampleConsumer vs. addSampleConsumer in AbstractSampleConsumer

Hi all,

why should we have setSampleConsumer and addSampleConsumer in a newly 
added class, when they have no different behaviour?

It is especially confusing, when both are used in one method 
(ReportGenerator#generate).

I would tend to remove setSampleConsumer, since the behaviour of that 
method is to add a consumer instead of replacing one.

Regards,
  Felix

Re: setSampleConsumer vs. addSampleConsumer in AbstractSampleConsumer

Posted by Philippe Mouawad <ph...@gmail.com>.
Agree

On Wed, Dec 30, 2015 at 5:38 PM, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Hi all,
>
> why should we have setSampleConsumer and addSampleConsumer in a newly
> added class, when they have no different behaviour?
>
> It is especially confusing, when both are used in one method
> (ReportGenerator#generate).
>
> I would tend to remove setSampleConsumer, since the behaviour of that
> method is to add a consumer instead of replacing one.
>
> Regards,
>  Felix
>



-- 
Cordialement.
Philippe Mouawad.