jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1697171 - in /jmeter/trunk/src: components/org/apache/jmeter/extractor/ components/org/apache/jmeter/sampler/ components/org/apache/jmeter/visualizers/ core/org/apache/jmeter/gui/ core/org/apache/jmeter/gui/action/ core/org/apache/jmeter/t...
Date Sun, 23 Aug 2015 12:19:56 GMT
Author: fschumacher
Date: Sun Aug 23 12:19:56 2015
New Revision: 1697171

URL: http://svn.apache.org/r1697171
Log:
Use interface instead of actual implementation for List/ArrayList where possible.

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessor.java
    jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
    jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java
    jmeter/trunk/src/functions/org/apache/jmeter/functions/FileRowColContainer.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
    jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
    jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessor.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/DebugPostProcessor.java Sun Aug
23 12:19:56 2015
@@ -21,8 +21,9 @@ package org.apache.jmeter.extractor;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.Map;
 import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.jmeter.processor.PostProcessor;
@@ -104,7 +105,7 @@ public class DebugPostProcessor extends
 
     private void formatSet(StringBuilder sb, @SuppressWarnings("rawtypes") Set s) {
         @SuppressWarnings("unchecked")
-        ArrayList<Map.Entry<Object, Object>> al = new ArrayList<>(s);
+        List<Map.Entry<Object, Object>> al = new ArrayList<>(s);
         Collections.sort(al, new Comparator<Map.Entry<Object, Object>>(){
             @Override
             public int compare(Map.Entry<Object, Object> o1, Map.Entry<Object, Object>
o2) {

Modified: jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/sampler/DebugSampler.java Sun Aug 23 12:19:56
2015
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -90,7 +91,7 @@ public class DebugSampler extends Abstra
 
     private void formatSet(StringBuilder sb, @SuppressWarnings("rawtypes") Set s) {
         @SuppressWarnings("unchecked")
-        ArrayList<Map.Entry<Object, Object>> al = new ArrayList<>(s);
+        List<Map.Entry<Object, Object>> al = new ArrayList<>(s);
         Collections.sort(al, new Comparator<Map.Entry<Object, Object>>(){
             @Override
             public int compare(Map.Entry<Object, Object> o1, Map.Entry<Object, Object>
o2) {

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java Sun
Aug 23 12:19:56 2015
@@ -29,6 +29,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -149,7 +150,7 @@ public class PropertyControlGui extends
             return;
         }
         Set<Map.Entry<Object, Object>> s = p.entrySet();
-        ArrayList<Map.Entry<Object, Object>> al = new ArrayList<>(s);
+        List<Map.Entry<Object, Object>> al = new ArrayList<>(s);
         Collections.sort(al, new Comparator<Map.Entry<Object, Object>>(){
             @Override
             public int compare(Map.Entry<Object, Object> o1, Map.Entry<Object, Object>
o2) {

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java Sun Aug 23 12:19:56 2015
@@ -766,7 +766,7 @@ public final class GuiPackage implements
      * @return copy of list of {@link Stoppable}s
      */
     public List<Stoppable> getStoppables() {
-        ArrayList<Stoppable> list = new ArrayList<>();
+        List<Stoppable> list = new ArrayList<>();
         list.addAll(stoppables);
         return list;
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java Sun Aug 23
12:19:56 2015
@@ -24,6 +24,7 @@ import java.awt.Window;
 import java.awt.event.ActionEvent;
 import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Locale;
 import java.util.Set;
 import java.util.prefs.Preferences;
@@ -60,7 +61,7 @@ public class LookAndFeelCommand implemen
         }
         String jMeterLaf = getJMeterLaf();
         if (log.isInfoEnabled()) {
-            ArrayList<String> names = new ArrayList<>();
+            List<String> names = new ArrayList<>();
             for(UIManager.LookAndFeelInfo laf : lfs) {
                 if (laf.getClassName().equals(jMeterLaf)) {
                     names.add(laf.getName());

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java Sun Aug 23 12:19:56
2015
@@ -510,7 +510,7 @@ public class JMeterThread implements Run
         List<SampleListener> sampleListeners = samplePack.getSampleListeners();
         // Do not send subsamples to listeners which receive the transaction sample
         if(transactionSampler != null) {
-            ArrayList<SampleListener> onlySubSamplerListeners = new ArrayList<>();
+            List<SampleListener> onlySubSamplerListeners = new ArrayList<>();
             List<SampleListener> transListeners = transactionPack.getSampleListeners();
             for(SampleListener listener : sampleListeners) {
                 // Check if this instance is present in transaction listener list

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java Sun Aug 23 12:19:56
2015
@@ -32,6 +32,7 @@ import java.security.cert.X509Certificat
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
@@ -114,7 +115,7 @@ public final class JmeterKeyStore {
         char pw[] = pword==null ? null : pword.toCharArray();
         store.load(is, pw);
     
-        ArrayList<String> v_names = new ArrayList<>();
+        List<String> v_names = new ArrayList<>();
         this.privateKeyByAlias = new HashMap<>();
         this.certsByAlias = new HashMap<>();
 

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/FileRowColContainer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileRowColContainer.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/FileRowColContainer.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/FileRowColContainer.java Sun Aug
23 12:19:56 2015
@@ -140,11 +140,11 @@ public class FileRowColContainer {
     /**
      * Splits the line according to the specified delimiter
      *
-     * @return an ArrayList of Strings containing one element for each value in
+     * @return a List of Strings containing one element for each value in
      *         the line
      */
     private static List<String> splitLine(String theLine, String delim) {
-        ArrayList<String> result = new ArrayList<>();
+        List<String> result = new ArrayList<>();
         StringTokenizer tokener = new StringTokenizer(theLine, delim, true);
         /*
          * the beginning of the line is a "delimiter" so that ,a,b,c returns ""

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java Sun Aug 23 12:19:56
2015
@@ -335,7 +335,7 @@ public final class ClassFinder {
         }
 
         // find all jar files or paths that end with strPathOrJar
-        ArrayList<String> listPaths = new ArrayList<>();
+        List<String> listPaths = new ArrayList<>();
         String strPath = null;
         while (stPaths.hasMoreTokens()) {
             strPath = fixPathEntry(stPaths.nextToken());

Modified: jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java (original)
+++ jmeter/trunk/src/junit/org/apache/jmeter/protocol/java/control/gui/ClassFilter.java Sun
Aug 23 12:19:56 2015
@@ -47,7 +47,7 @@ class ClassFilter {
     }
 
     String[] filterArray(List<String> items) {
-        ArrayList<String> newlist = new ArrayList<>();
+        List<String> newlist = new ArrayList<>();
         for (String item : items) {
             if (include(item)) {
                 newlist.add(item);

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
Sun Aug 23 12:19:56 2015
@@ -27,6 +27,7 @@ import java.net.URL;
 import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.zip.GZIPInputStream;
 
@@ -750,7 +751,7 @@ public class HTTPHC3Impl extends HTTPHCA
 
             final boolean browserCompatible = getDoBrowserCompatibleMultipart();
             // We don't know how many entries will be skipped
-            ArrayList<PartBase> partlist = new ArrayList<>();
+            List<PartBase> partlist = new ArrayList<>();
             // Create the parts
             // Add any parameters
             PropertyIterator args = getArguments().iterator();

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java Sun
Aug 23 12:19:56 2015
@@ -25,6 +25,7 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -320,7 +321,7 @@ public class WSDLHelper {
      * @return Node[]
      */
     public Object[] getSOAPBindings() {
-        ArrayList<Element> list = new ArrayList<>();
+        List<Element> list = new ArrayList<>();
         NodeList bindings = WSDLDOC.getElementsByTagNameNS(WSDL_NAMESPACE,"binding");
         for (int idx = 0; idx < bindings.getLength(); idx++) {
             Element nd = (Element) bindings.item(idx);
@@ -357,7 +358,7 @@ public class WSDLHelper {
      */
     public Object[] getOperations() {
         Object[] res = this.getSOAPBindings();
-        ArrayList<Element> ops = new ArrayList<>();
+        List<Element> ops = new ArrayList<>();
         // first we iterate through the bindings
         for (int idx = 0; idx < res.length; idx++) {
             Element one = (Element) res[idx];

Modified: jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java?rev=1697171&r1=1697170&r2=1697171&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
(original)
+++ jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/AbstractJDBCTestElement.java
Sun Aug 23 12:19:56 2015
@@ -240,7 +240,7 @@ public abstract class AbstractJDBCTestEl
             }
         } while (result || (updateCount != -1));
         if (out!=null && pstmt instanceof CallableStatement){
-            ArrayList<Object> outputValues = new ArrayList<>();
+            List<Object> outputValues = new ArrayList<>();
             CallableStatement cs = (CallableStatement) pstmt;
             sb.append("Output variables by position:\n");
             for(int i=0; i < out.length; i++){



Mime
View raw message