jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1210187 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java
Date Sun, 04 Dec 2011 19:37:33 GMT
Author: sebb
Date: Sun Dec  4 19:37:33 2011
New Revision: 1210187

URL: http://svn.apache.org/viewvc?rev=1210187&view=rev
Log:
No functional change
Re-order so variables of same type are grouped together
Added @GuardedBy comments (omitted from some because not currently always guarded)

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=1210187&r1=1210186&r2=1210187&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
19:37:33 2011
@@ -62,12 +62,11 @@ import org.apache.log.Logger;
 public class StringFromFile extends AbstractFunction implements TestListener {
     private static final Logger log = LoggingManager.getLoggerForClass();
 
+    // Only modified by static block so no need to synchronize subsequent read-only access
     private static final List<String> desc = new LinkedList<String>();
 
     private static final String KEY = "__StringFromFile";//$NON-NLS-1$
 
-    // Function name (only 1 _)
-
     static final String ERR_IND = "**ERR**";//$NON-NLS-1$
 
     static {
@@ -87,29 +86,33 @@ public class StringFromFile extends Abst
 
     private static final int MAX_PARAM_COUNT = 4;
 
+    private static final int COUNT_UNUSED = -2;
+
+    // @GuardedBy("this")
     private Object[] values;
 
     private BufferedReader myBread = null; // Buffered reader
 
-    private boolean firstTime = false; // should we try to open the
-                                                    // file?
+    // @GuardedBy("this")
+    private boolean firstTime = false; // should we try to open the file?
 
     private String fileName; // needed for error messages
 
-    public StringFromFile() {
-        if (log.isDebugEnabled()) {
-            log.debug("++++++++ Construct " + this);
-        }
-    }
-
-    private static final int COUNT_UNUSED = -2;
-
+    // @GuardedBy("this")
     private int myStart = COUNT_UNUSED;
 
+    // @GuardedBy("this")
     private int myCurrent = COUNT_UNUSED;
 
+    // @GuardedBy("this")
     private int myEnd = COUNT_UNUSED;
 
+    public StringFromFile() {
+        if (log.isDebugEnabled()) {
+            log.debug("++++++++ Construct " + this);
+        }
+    }
+
     /**
      * Close file and log
      */



Mime
View raw message