jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1571303 - /jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java
Date Mon, 24 Feb 2014 14:41:37 GMT
Author: sebb
Date: Mon Feb 24 14:41:37 2014
New Revision: 1571303

URL: http://svn.apache.org/r1571303
Log:
Only open resources as they are needed

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java?rev=1571303&r1=1571302&r2=1571303&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BeanShellClient.java Mon Feb 24 14:41:37
2014
@@ -53,14 +53,10 @@ public class BeanShellClient {
 
         Socket sock = new Socket(host,port);
         InputStream is = sock.getInputStream();
-
-        OutputStream os = sock.getOutputStream();
-
-        InputStreamReader fis = new FileReader(file);
-
-        final SockRead sockRead = new SockRead(is);
+        SockRead sockRead = new SockRead(is);
         sockRead.start();
 
+        OutputStream os = sock.getOutputStream();
         sendLine("bsh.prompt=\"\";",os);// Prompt is unnecessary
 
         sendLine("String [] args={",os);
@@ -70,6 +66,7 @@ public class BeanShellClient {
         sendLine("};",os);
 
         int b;
+        InputStreamReader fis = new FileReader(file);
         while ((b=fis.read()) != -1){
             os.write(b);
         }



Mime
View raw message