You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/02/28 15:31:19 UTC
DO NOT REPLY [Bug 52788] HttpRequestHdr : Optimize code to avoid
useless work
https://issues.apache.org/bugzilla/show_bug.cgi?id=52788
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |p.mouawad@ubik-ingenierie.c
| |om
--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> 2012-02-28 14:31:19 UTC ---
(In reply to comment #0)
> Hello,
> Analyzing code I must say I don't understand what's the use of these lines in
> HttpRequestHdr#createSampler:
>
> // Damn! A whole new GUI just to instantiate a test element?
> // Isn't there a beter way?
> HttpTestSampleGui tempGui = new HttpTestSampleGui();
> sampler.setProperty(TestElement.GUI_CLASS,
> tempGui.getClass().getName());
> tempGui.configure(sampler);
> tempGui.modifyTestElement(sampler);
>
>
> They should be in my opinion replaced by:
>
> sampler.setProperty(TestElement.GUI_CLASS,
> HttpTestSampleGui.class.getName());
Replaced by;
HttpTestSampleGui tempGui = new HttpTestSampleGui();
sampler.setProperty(TestElement.GUI_CLASS,
tempGui.class.getName());
>
>
> My analysis is the following:
>
> Configure will configure GUI from Sampler
> Then sampler is configured from GUI
> And then GUI is thrown away
>
>
> Did I miss something ?
1) tempGui.configure(sampler) => will configure GUI from Sampler
2) tempGui.modifyTestElement(sampler); => will reconfigure sampler from GUI
(that has just been configured from Sampler)
3) And then tempGui is thrown away
>
> Regards
> Philippe
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.