jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1210096 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java
Date Sun, 04 Dec 2011 12:03:07 GMT
Author: pmouawad
Date: Sun Dec  4 12:03:07 2011
New Revision: 1210096

URL: http://svn.apache.org/viewvc?rev=1210096&view=rev
Log:
Removed useless instance variables that can be local

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=1210096&r1=1210095&r2=1210096&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java Sun Dec  4
12:03:07 2011
@@ -88,10 +88,6 @@ public class StringFromFile extends Abst
 
     private static final int MAX_PARAM_COUNT = 4;
 
-    private String myValue;
-
-    private String myName;
-
     private Object[] values;
 
     private BufferedReader myBread = null; // Buffered reader
@@ -102,8 +98,6 @@ public class StringFromFile extends Abst
     private String fileName; // needed for error messages
 
     public StringFromFile() {
-    	myValue = ERR_IND;
-    	myName = "StringFromFile_";//$NON-NLS-1$
         if (log.isDebugEnabled()) {
             log.debug("++++++++ Construct " + this);
         }
@@ -189,14 +183,12 @@ public class StringFromFile extends Abst
     @Override
     public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
             throws InvalidVariableException {
-
-
+        String myValue = ERR_IND;
+    	String myName = "StringFromFile_";//$NON-NLS-1$
         if (values.length >= PARAM_NAME) {
             myName = ((CompoundVariable) values[PARAM_NAME - 1]).execute().trim();
         }
 
-        myValue = ERR_IND;
-
         /*
          * To avoid re-opening the file repeatedly after an error, only try to
          * open it in the first execute() call (It may be re=opened at EOF, but



Mime
View raw message