You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/03/18 12:26:25 UTC

svn commit: r1787552 - /jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java

Author: pmouawad
Date: Sat Mar 18 12:26:25 2017
New Revision: 1787552

URL: http://svn.apache.org/viewvc?rev=1787552&view=rev
Log:
Comment on what seems to be SONAR false positive

Modified:
    jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java

Modified: jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java?rev=1787552&r1=1787551&r2=1787552&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java (original)
+++ jmeter/trunk/src/protocol/ftp/org/apache/jmeter/protocol/ftp/sampler/FTPSampler.java Sat Mar 18 12:26:25 2017
@@ -213,7 +213,7 @@ public class FTPSampler extends Abstract
                         } else {
                             File infile = new File(local);
                             res.setBytes(infile.length());
-                            fileIS = new FileInputStream(infile);
+                            fileIS = new FileInputStream(infile); // NOSONAR False positive, fileIS is closed in finally and not overwritten
                             input = new BufferedInputStream(fileIS);
                         }
                         ftpOK = ftp.storeFile(remote, input);
@@ -228,7 +228,7 @@ public class FTPSampler extends Abstract
                                 target=baos;
                             }
                             if (local.length()>0){
-                                output=new FileOutputStream(local);
+                                output=new FileOutputStream(local); // NOSONAR False positive, the output is closed in finally and not overwritten
                                 if (target==null) {
                                     target=output;
                                 } else {