jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1697169 - in /jmeter/trunk/src/core/org/apache/jmeter/gui/action: AboutCommand.java ActionRouter.java AddToTree.java SSLManagerCommand.java What.java
Date Sun, 23 Aug 2015 11:56:44 GMT
Author: fschumacher
Date: Sun Aug 23 11:56:44 2015
New Revision: 1697169

URL: http://svn.apache.org/r1697169
Log:
Use interface instead of actual implementation for Set/HashSet where possible.

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/AddToTree.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/SSLManagerCommand.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java?rev=1697169&r1=1697168&r2=1697169&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java Sun Aug 23 11:56:44
2015
@@ -53,7 +53,7 @@ public class AboutCommand implements Com
     private static JDialog about;
 
     static {
-        HashSet<String> commands = new HashSet<>();
+        Set<String> commands = new HashSet<>();
         commands.add(ActionNames.ABOUT);
         commandSet = Collections.unmodifiableSet(commands);
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java?rev=1697169&r1=1697168&r2=1697169&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionRouter.java Sun Aug 23 11:56:44
2015
@@ -46,10 +46,10 @@ public final class ActionRouter implemen
 
     private Map<String, Set<Command>> commands = new HashMap<>();
 
-    private final Map<String, HashSet<ActionListener>> preActionListeners =
+    private final Map<String, Set<ActionListener>> preActionListeners =
             new HashMap<>();
 
-    private final Map<String, HashSet<ActionListener>> postActionListeners =
+    private final Map<String, Set<ActionListener>> postActionListeners =
             new HashMap<>();
 
     private ActionRouter() {
@@ -188,7 +188,7 @@ public final class ActionRouter implemen
      */
     public void addPreActionListener(Class<?> action, ActionListener listener) {
         if (action != null) {
-            HashSet<ActionListener> set = preActionListeners.get(action.getName());
+            Set<ActionListener> set = preActionListeners.get(action.getName());
             if (set == null) {
                 set = new HashSet<>();
             }
@@ -210,7 +210,7 @@ public final class ActionRouter implemen
      */
     public void removePreActionListener(Class<?> action, ActionListener listener) {
         if (action != null) {
-            HashSet<ActionListener> set = preActionListeners.get(action.getName());
+            Set<ActionListener> set = preActionListeners.get(action.getName());
             if (set != null) {
                 set.remove(listener);
                 preActionListeners.put(action.getName(), set);
@@ -231,7 +231,7 @@ public final class ActionRouter implemen
      */
     public void addPostActionListener(Class<?> action, ActionListener listener) {
         if (action != null) {
-            HashSet<ActionListener> set = postActionListeners.get(action.getName());
+            Set<ActionListener> set = postActionListeners.get(action.getName());
             if (set == null) {
                 set = new HashSet<>();
             }
@@ -252,7 +252,7 @@ public final class ActionRouter implemen
      */
     public void removePostActionListener(Class<?> action, ActionListener listener)
{
         if (action != null) {
-            HashSet<ActionListener> set = postActionListeners.get(action.getName());
+            Set<ActionListener> set = postActionListeners.get(action.getName());
             if (set != null) {
                 set.remove(listener);
                 postActionListeners.put(action.getName(), set);

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/AddToTree.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/AddToTree.java?rev=1697169&r1=1697168&r2=1697169&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/AddToTree.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/AddToTree.java Sun Aug 23 11:56:44
2015
@@ -40,7 +40,7 @@ public class AddToTree implements Comman
     private static final Set<String> commandSet;
 
     static {
-        HashSet<String> commands = new HashSet<>();
+        Set<String> commands = new HashSet<>();
         commands.add(ActionNames.ADD);
         commandSet = Collections.unmodifiableSet(commands);
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/SSLManagerCommand.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/SSLManagerCommand.java?rev=1697169&r1=1697168&r2=1697169&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/SSLManagerCommand.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/SSLManagerCommand.java Sun Aug 23 11:56:44
2015
@@ -55,7 +55,7 @@ import org.apache.jmeter.util.SSLManager
 public class SSLManagerCommand implements Command {
     private static final Set<String> commandSet;
     static {
-        HashSet<String> commands = new HashSet<>();
+        Set<String> commands = new HashSet<>();
         commands.add(ActionNames.SSL_MANAGER);
         commandSet = Collections.unmodifiableSet(commands);
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java?rev=1697169&r1=1697168&r2=1697169&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java Sun Aug 23 11:56:44 2015
@@ -47,7 +47,7 @@ public class What implements Command {
     private static final Set<String> commandSet;
 
     static {
-        HashSet<String> commands = new HashSet<>();
+        Set<String> commands = new HashSet<>();
         commands.add(ActionNames.WHAT_CLASS);
         commands.add(ActionNames.DEBUG_ON);
         commands.add(ActionNames.DEBUG_OFF);



Mime
View raw message