jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1210289 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java
Date Mon, 05 Dec 2011 00:12:04 GMT
Author: sebb
Date: Mon Dec  5 00:12:04 2011
New Revision: 1210289

URL: http://svn.apache.org/viewvc?rev=1210289&view=rev
Log:
Bug 52266 - Code:Inconsistent synchronization
Ensure safe publication of variables

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=1210289&r1=1210288&r2=1210289&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/StringFromFile.java Mon Dec  5
00:12:04 2011
@@ -91,11 +91,13 @@ public class StringFromFile extends Abst
     // @GuardedBy("this")
     private Object[] values;
 
+    // @GuardedBy("this")
     private BufferedReader myBread = null; // Buffered reader
 
     // @GuardedBy("this")
     private boolean firstTime = false; // should we try to open the file?
 
+    // @GuardedBy("this")
     private String fileName; // needed for error messages
 
     // @GuardedBy("this")
@@ -116,7 +118,7 @@ public class StringFromFile extends Abst
     /**
      * Close file and log
      */
-    private void closeFile() {
+    private synchronized void closeFile() {
         if (myBread == null) {
             return;
         }



Mime
View raw message