jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1408709 - /jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java
Date Tue, 13 Nov 2012 12:58:56 GMT
Author: sebb
Date: Tue Nov 13 12:58:55 2012
New Revision: 1408709

URL: http://svn.apache.org/viewvc?rev=1408709&view=rev
Log:
Ensure that the same default value is used for the setter and getter

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java?rev=1408709&r1=1408708&r2=1408709&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java Tue Nov 13
12:58:55 2012
@@ -43,6 +43,8 @@ public class ForeachController extends G
 
     private static final String USE_SEPARATOR = "ForeachController.useSeparator";// $NON-NLS-1$
 
+    private static final String INDEX_DEFAULT_VALUE = ""; // start/end index default value
for string getters and setters
+
     private int loopCount = 0;
 
     private static final String DEFAULT_SEPARATOR = "_";// $NON-NLS-1$
@@ -55,7 +57,7 @@ public class ForeachController extends G
      * @param startIndex Start index  of loop
      */
     public void setStartIndex(String startIndex) {
-        setProperty(START_INDEX, startIndex, "");
+        setProperty(START_INDEX, startIndex, INDEX_DEFAULT_VALUE);
     }
 
     /**
@@ -70,14 +72,14 @@ public class ForeachController extends G
      * @return start index of loop as String
      */
     public String getStartIndexAsString() {
-        return getPropertyAsString(START_INDEX, "");
+        return getPropertyAsString(START_INDEX, INDEX_DEFAULT_VALUE);
     }
     
     /**
      * @param endIndex End index  of loop
      */
     public void setEndIndex(String endIndex) {
-        setProperty(END_INDEX, endIndex, "");
+        setProperty(END_INDEX, endIndex, INDEX_DEFAULT_VALUE);
     }
 
     /**
@@ -91,7 +93,7 @@ public class ForeachController extends G
      * @return end index of loop
      */
     public String getEndIndexAsString() {
-        return getPropertyAsString(END_INDEX, "");
+        return getPropertyAsString(END_INDEX, INDEX_DEFAULT_VALUE);
     }
     
     public void setInputVal(String inputValue) {



Mime
View raw message