jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1203378 - in /jmeter/trunk/src: components/org/apache/jmeter/visualizers/StatGraphVisualizer.java core/org/apache/jmeter/save/CSVSaveService.java
Date Thu, 17 Nov 2011 21:36:24 GMT
Author: pmouawad
Date: Thu Nov 17 21:36:24 2011
New Revision: 1203378

URL: http://svn.apache.org/viewvc?rev=1203378&view=rev
Log:
Replace Vector by ArrayList , no need for synchronization.

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
    jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java?rev=1203378&r1=1203377&r2=1203378&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java Thu
Nov 17 21:36:24 2011
@@ -25,8 +25,9 @@ import java.awt.event.ActionListener;
 import java.io.FileNotFoundException;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
-import java.util.Vector;
 import java.util.concurrent.ConcurrentHashMap;
 
 import javax.swing.BoxLayout;
@@ -348,12 +349,12 @@ public class StatGraphVisualizer extends
      * work as expected.
      * @return the data from the model
      */
-    public Vector<Vector<Object>> getAllTableData() {
-        Vector<Vector<Object>> data = new Vector<Vector<Object>>();
+    public List<List<Object>> getAllTableData() {
+        List<List<Object>> data = new ArrayList<List<Object>>();
         if (model.getRowCount() > 0) {
             for (int rw=0; rw < model.getRowCount(); rw++) {
                 int cols = model.getColumnCount();
-                Vector<Object> column = new Vector<Object>();
+                List<Object> column = new ArrayList<Object>();
                 data.add(column);
                 for (int idx=0; idx < cols; idx++) {
                     Object val = model.getValueAt(rw,idx);

Modified: jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java?rev=1203378&r1=1203377&r2=1203378&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/CSVSaveService.java Thu Nov 17 21:36:24 2011
@@ -660,7 +660,7 @@ public final class CSVSaveService {
      *            header names (if non-null)
      * @throws IOException
      */
-    public static void saveCSVStats(Vector<?> data, FileWriter writer,
+    public static void saveCSVStats(List<?> data, FileWriter writer,
             String headers[]) throws IOException {
         final char DELIM = ',';
         final char SPECIALS[] = new char[] { DELIM, QUOTING_CHAR };
@@ -674,12 +674,12 @@ public final class CSVSaveService {
             writer.write(LINE_SEP);
         }
         for (int idx = 0; idx < data.size(); idx++) {
-            Vector<?> row = (Vector<?>) data.elementAt(idx);
+            List<?> row = (List<?>) data.get(idx);
             for (int idy = 0; idy < row.size(); idy++) {
                 if (idy > 0) {
                     writer.write(DELIM);
                 }
-                Object item = row.elementAt(idy);
+                Object item = row.get(idy);
                 writer.write(quoteDelimiters(String.valueOf(item), SPECIALS));
             }
             writer.write(LINE_SEP);



Mime
View raw message