jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1719794 - /jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java
Date Sun, 13 Dec 2015 11:27:57 GMT
Author: fschumacher
Date: Sun Dec 13 11:27:57 2015
New Revision: 1719794

URL: http://svn.apache.org/viewvc?rev=1719794&view=rev
Log:
Use local StringBuilder instead of global one.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java?rev=1719794&r1=1719793&r2=1719794&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java Sun Dec 13 11:27:57
2015
@@ -45,8 +45,6 @@ public class CsvSampleWriter extends Abs
 
     private SampleMetadata metadata;
 
-    private StringBuilder row = new StringBuilder();
-
     private long sampleCount;
 
     public CsvSampleWriter(SampleMetadata metadata) {
@@ -102,7 +100,7 @@ public class CsvSampleWriter extends Abs
      * header information will be written in the middle of the file.
      */
     public void writeHeader() {
-        row.setLength(0);
+        StringBuilder row = new StringBuilder();
         for (int i = 0; i < columnCount; i++) {
             row.append(metadata.getColumnName(i));
             if (i < columnCount - 1) {
@@ -122,7 +120,7 @@ public class CsvSampleWriter extends Abs
                     "No writer set! Call setWriter() first!");
         }
 
-        row.setLength(0);
+        StringBuilder row = new StringBuilder();
         char[] specials = new char[] { separator,
                 CSVSaveService.QUOTING_CHAR, CharUtils.CR, CharUtils.LF };
         for (int i = 0; i < columnCount; i++) {



Mime
View raw message