jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380912 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java
Date Tue, 04 Sep 2012 21:51:54 GMT
Author: pmouawad
Date: Tue Sep  4 21:51:54 2012
New Revision: 1380912

URL: http://svn.apache.org/viewvc?rev=1380912&view=rev
Log:
Ok found the bug

Modified:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java?rev=1380912&r1=1380911&r2=1380912&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java Tue Sep  4
21:51:54 2012
@@ -143,9 +143,9 @@ public class StringFromFile extends Abst
         String start = "";
         if (values.length >= PARAM_START) {
             start = ((CompoundVariable) values[PARAM_START - 1]).execute();
-            try {
+            if(StringUtils.isNumeric(start)) {
                 myStart = Integer.parseInt(start);
-            } catch (NumberFormatException e) {
+            } else {
                 myStart = COUNT_UNUSED;// Don't process invalid numbers
             }
         }
@@ -157,11 +157,11 @@ public class StringFromFile extends Abst
 
         if (values.length >= PARAM_END) {
             String tmp = ((CompoundVariable) values[PARAM_END - 1]).execute();
-            try {
+            if(StringUtils.isNumeric(tmp)) {
                 myEnd = Integer.parseInt(tmp);
-            } catch (NumberFormatException e) {
+            } else {
                 myEnd = COUNT_UNUSED;// Don't process invalid numbers
-                                        // (including "")
+                                    // (including "")
             }
         }
 



Mime
View raw message