You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2013/03/17 01:03:12 UTC

svn commit: r1457348 - /jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java

Author: sebb
Date: Sun Mar 17 00:03:11 2013
New Revision: 1457348

URL: http://svn.apache.org/r1457348
Log:
Unnecessary instance variable

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java?rev=1457348&r1=1457347&r2=1457348&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleEvent.java Sun Mar 17 00:03:11 2013
@@ -43,10 +43,8 @@ public class SampleEvent implements Seri
 
     // List of variable names to be saved in JTL files
     private static final String[] variableNames;
-    // Number of variable names
-    private static final int varCount;
 
-    // The values. Entries be null, but there will be the correct number.
+    // The values. Entries may be null, but there will be the correct number.
     private final String[] values;
 
     static {
@@ -60,7 +58,7 @@ public class SampleEvent implements Seri
 
         String vars = JMeterUtils.getProperty(SAMPLE_VARIABLES);
            variableNames=vars != null ? vars.split(",") : new String[0];
-           varCount=variableNames.length;
+           int varCount=variableNames.length;
         if (varCount>0){
             log.info(varCount + " sample_variables have been declared: "+vars);
         }
@@ -143,7 +141,7 @@ public class SampleEvent implements Seri
 
     /** Return the number of variables defined */
     public static int getVarCount(){
-        return varCount;
+        return variableNames.length;
     }
 
     /** Get the nth variable name (zero-based) */