jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380831 - in /jmeter/trunk/src/core/org/apache/jmeter: JMeter.java gui/MainFrame.java
Date Tue, 04 Sep 2012 19:58:07 GMT
Author: pmouawad
Date: Tue Sep  4 19:58:07 2012
New Revision: 1380831

URL: http://svn.apache.org/viewvc?rev=1380831&view=rev
Log:
Remove unused parameter
Use char for indexOf
Make fields final

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1380831&r1=1380830&r2=1380831&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Tue Sep  4 19:58:07 2012
@@ -228,7 +228,7 @@ public class JMeter implements JMeterPlu
         treeLis.setActionHandler(ActionRouter.getInstance());
         // NOTUSED: GuiPackage guiPack =
         GuiPackage.getInstance(treeLis, treeModel);
-        MainFrame main = new MainFrame(ActionRouter.getInstance(), treeModel, treeLis);
+        MainFrame main = new MainFrame(treeModel, treeLis);
         ComponentUtil.centerComponentInWindow(main, 80);
         main.setVisible(true);
         ActionRouter.getInstance().actionPerformed(new ActionEvent(main, 1, ActionNames.ADD_ALL));

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java?rev=1380831&r1=1380830&r2=1380831&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/MainFrame.java Tue Sep  4 19:58:07 2012
@@ -139,13 +139,13 @@ public class MainFrame extends JFrame im
     private JTree tree;
 
     /** An image which is displayed when a test is running. */
-    private ImageIcon runningIcon = JMeterUtils.getImage("thread.enabled.gif");// $NON-NLS-1$
+    private final ImageIcon runningIcon = JMeterUtils.getImage("thread.enabled.gif");// $NON-NLS-1$
 
     /** An image which is displayed when a test is not currently running. */
-    private ImageIcon stoppedIcon = JMeterUtils.getImage("thread.disabled.gif");// $NON-NLS-1$
+    private final ImageIcon stoppedIcon = JMeterUtils.getImage("thread.disabled.gif");//
$NON-NLS-1$
 
     /** An image which is displayed to indicate FATAL, ERROR or WARNING. */
-    private ImageIcon warningIcon = JMeterUtils.getImage("warning.png");// $NON-NLS-1$
+    private final ImageIcon warningIcon = JMeterUtils.getImage("warning.png");// $NON-NLS-1$
 
     /** The button used to display the running/stopped image. */
     private JButton runningIndicator;
@@ -157,7 +157,7 @@ public class MainFrame extends JFrame im
     private int previousDragYLocation = 0;
 
     /** The set of currently running hosts. */
-    private Set<String> hosts = new HashSet<String>();
+    private final Set<String> hosts = new HashSet<String>();
 
     /** A message dialog shown while JMeter threads are stopping. */
     private JDialog stoppingMessage;
@@ -190,7 +190,7 @@ public class MainFrame extends JFrame im
      * @param treeListener
      *            the listener for the test tree
      */
-    public MainFrame(ActionListener actionHandler, TreeModel treeModel, JMeterTreeListener
treeListener) {
+    public MainFrame(TreeModel treeModel, JMeterTreeListener treeListener) {
         // TODO: actionHandler isn't used -- remove it from the parameter list
         // this.actionHandler = actionHandler;
 
@@ -512,7 +512,7 @@ public class MainFrame extends JFrame im
 
         // allow for windows / chars in filename
         String temp = fname.replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$
-        String simpleName = temp.substring(temp.lastIndexOf("/") + 1);// $NON-NLS-1$
+        String simpleName = temp.substring(temp.lastIndexOf('/') + 1);// $NON-NLS-1$
         setTitle(simpleName + " (" + fname + ") - " + DEFAULT_TITLE); // $NON-NLS-1$ // $NON-NLS-2$
     }
 



Mime
View raw message