jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1437171 - /jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java
Date Tue, 22 Jan 2013 21:07:37 GMT
Author: pmouawad
Date: Tue Jan 22 21:07:37 2013
New Revision: 1437171

URL: http://svn.apache.org/viewvc?rev=1437171&view=rev
Log:
code cleanup

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java?rev=1437171&r1=1437170&r2=1437171&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/control/WhileController.java Tue Jan 22 21:07:37
2013
@@ -54,7 +54,9 @@ public class WhileController extends Gen
      */
     private boolean endOfLoop(boolean loopEnd) {
         String cnd = getCondition().trim();
-        log.debug("Condition string:" + cnd+".");
+        if(log.isDebugEnabled()) {
+            log.debug("Condition string:" + cnd+".");
+        }
         boolean res;
         // If blank, only check previous sample when at end of loop
         if ((loopEnd && cnd.length() == 0) || "LAST".equalsIgnoreCase(cnd)) {// $NON-NLS-1$
@@ -64,7 +66,9 @@ public class WhileController extends Gen
             // cnd may be null if next() called us
             res = "false".equalsIgnoreCase(cnd);// $NON-NLS-1$
         }
-        log.debug("Condition value: " + res);
+        if(log.isDebugEnabled()) {
+            log.debug("Condition value: " + res);
+        }
         return res;
     }
 
@@ -111,7 +115,9 @@ public class WhileController extends Gen
      *            the condition to save
      */
     public void setCondition(String string) {
-        log.debug("setCondition(" + string + ")");
+        if(log.isDebugEnabled()) {
+            log.debug("setCondition(" + string + ")");
+        }
         setProperty(new StringProperty(CONDITION, string));
     }
 
@@ -119,10 +125,8 @@ public class WhileController extends Gen
      * @return the condition
      */
     public String getCondition() {
-        String cnd;
         JMeterProperty prop=getProperty(CONDITION);
         prop.recoverRunningVersion(this);
-        cnd = prop.getStringValue();
-        return cnd;
+        return prop.getStringValue();
     }
 }
\ No newline at end of file



Mime
View raw message