Author: fschumacher
Date: Thu Jan 26 19:59:26 2017
New Revision: 1780458

URL: http://svn.apache.org/viewvc?rev=1780458&view=rev
Log:
Use try-with statement to simplify code.

Modified:
    jmeter/trunk/docs/images/screenshots/dashboard/report_statistics.png
    
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java

Modified: jmeter/trunk/docs/images/screenshots/dashboard/report_statistics.png
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/dashboard/report_statistics.png?rev=1780458&r1=1780457&r2=1780458&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java
URL: 
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java?rev=1780458&r1=1780457&r2=1780458&view=diff
==============================================================================
--- 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java
 (original)
+++ 
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/SoapSampler.java
 Thu Jan 26 19:59:26 2017
@@ -184,13 +184,10 @@ public class SoapSampler extends HTTPSam
 
                 @Override
                 public void writeRequest(OutputStream out) throws IOException {
-                    InputStream in = null;
-                    try{
-                        in = new BufferedInputStream(new 
FileInputStream(xmlFile));
+                    try (InputStream fileStream = new FileInputStream(xmlFile);
+                            InputStream in = new 
BufferedInputStream(fileStream)) {
                         IOUtils.copy(in, out);
                         out.flush();
-                    } finally {
-                        IOUtils.closeQuietly(in);
                     }
                 }
 


Reply via email to