You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2004/03/30 06:59:44 UTC

DO NOT REPLY [Bug 26672] - IfController is not evaluating correctly

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26672>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26672

IfController is not evaluating correctly





------- Additional Comments From geyb@runway.cn.net  2004-03-30 04:59 -------
In the method nextIsAController of the class GenericController, the method 
currentReturnedNull will be called if getting next sampler returns a null. Then 
it will be judged whether the controller is done. If the controller is a 
IfController, it will be treated as done when current evaluation returns false. 
And then the IfController will be removed from subControllersAndSamplers.

So I modified line 177 in the method currentReturnedNull as follows:

protected void currentReturnedNull(Controller c)
{
    if (c.isDone() && !c.getClass().getName().equals
            ("org.apache.jmeter.control.IfController"))
    {
        removeCurrentElement();
    }
    else
    {
        incrementCurrent();
    }
}

If it is a IfController, it will not be removed.
Now it is working fine.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org