mstover1 2004/06/12 09:40:17
Modified: src/core/org/apache/jmeter/control IfController.java
Log:
IfController should call nextIsNull() before returning null value
Revision Changes Path
1.8 +23 -17
jakarta-jmeter/src/core/org/apache/jmeter/control/IfController.java
Index: IfController.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/control/IfController.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- IfController.java 24 May 2004 23:12:30 -0000 1.7
+++ IfController.java 12 Jun 2004 16:40:16 -0000 1.8
@@ -162,21 +162,27 @@
* - if its the first time this is run. The first time is special
* cause it is called prior the iteration even starts !
*/
- public Sampler next() {
- boolean result = false;
- try {
- result = evaluateCondition();
- }
- catch (Exception e)
- {
- logger.error(e.getMessage(),e);
- }
- if (result)
- return super.next();
- else
- return null;
-
- }
+ public Sampler next()
+ {
+ boolean result = false;
+ try {
+ result = evaluateCondition();
+ }
+ catch (Exception e)
+ {
+ logger.error(e.getMessage(),e);
+ }
+ if (result)
+ return super.next();
+ else try
+ {
+ return nextIsNull();
+ }
+ catch (NextIsNullException e1)
+ {
+ return null;
+ }
+ }
////////////////////////////// Start of Test Code ///////////////////////////
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]