jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1379955 - /jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
Date Sun, 02 Sep 2012 12:14:40 GMT
Author: sebb
Date: Sun Sep  2 12:14:40 2012
New Revision: 1379955

URL: http://svn.apache.org/viewvc?rev=1379955&view=rev
Log:
Ensure scriptName is safely published across threads

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java?rev=1379955&r1=1379954&r2=1379955&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java Sun Sep  2 12:14:40 2012
@@ -82,7 +82,8 @@ public class FileServer {
 
     private final Random random = new Random();
 
-	private String scriptName;
+    // volatile needed to ensure safe publication
+	private volatile String scriptName;
 
     // Cannot be instantiated
     private FileServer() {



Mime
View raw message