jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380351 - in /jmeter/trunk/src/core/org/apache/jmeter/config/gui: ArgumentsPanel.java LoginConfigGui.java ObsoleteGui.java RowDetailDialog.java SimpleConfigGui.java
Date Mon, 03 Sep 2012 20:41:38 GMT
Author: pmouawad
Date: Mon Sep  3 20:41:37 2012
New Revision: 1380351

URL: http://svn.apache.org/viewvc?rev=1380351&view=rev
Log:
Make field final
Make field local when possible

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/LoginConfigGui.java
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/ObsoleteGui.java
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java?rev=1380351&r1=1380350&r2=1380351&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java Mon Sep  3 20:41:37
2012
@@ -77,9 +77,6 @@ public class ArgumentsPanel extends Abst
     /** A button for adding new arguments to the table. */
     private JButton add;
 
-    /** A button for adding new arguments to the table from the clipboard. */
-    private JButton addFromClipboard;
-
     /** A button for removing arguments from the table. */
     private JButton delete;
 
@@ -102,8 +99,6 @@ public class ArgumentsPanel extends Abst
 
     private final boolean enableUpDown;
 
-    private JButton showDetail;
-
     /** Command for adding a row to the table. */
     private static final String ADD = "add"; // $NON-NLS-1$
 
@@ -625,15 +620,15 @@ public class ArgumentsPanel extends Abst
      * @return a GUI panel containing the buttons
      */
     private JPanel makeButtonPanel() {
-        showDetail = new JButton(JMeterUtils.getResString("detail")); // $NON-NLS-1$
+        JButton showDetail = new JButton(JMeterUtils.getResString("detail")); // $NON-NLS-1$
         showDetail.setActionCommand(DETAIL);
         showDetail.setEnabled(true);
         
         add = new JButton(JMeterUtils.getResString("add")); // $NON-NLS-1$
         add.setActionCommand(ADD);
         add.setEnabled(true);
-
-        addFromClipboard = new JButton(JMeterUtils.getResString("add_from_clipboard")); //
$NON-NLS-1$
+        /** A button for adding new arguments to the table from the clipboard. */
+        JButton addFromClipboard = new JButton(JMeterUtils.getResString("add_from_clipboard"));
// $NON-NLS-1$
         addFromClipboard.setActionCommand(ADD_FROM_CLIPBOARD);
         addFromClipboard.setEnabled(true);
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/LoginConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/LoginConfigGui.java?rev=1380351&r1=1380350&r2=1380351&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/LoginConfigGui.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/LoginConfigGui.java Mon Sep  3 20:41:37
2012
@@ -40,10 +40,10 @@ public class LoginConfigGui extends Abst
     private static final long serialVersionUID = 240L;
 
     /** Field allowing the user to enter a username. */
-    private JTextField username = new JTextField(15);
+    private final JTextField username = new JTextField(15);
 
     /** Field allowing the user to enter a password. */
-    private JPasswordField password = new JPasswordField(15);
+    private final JPasswordField password = new JPasswordField(15);
 
     /**
      * Boolean indicating whether or not this component should display its name.

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/ObsoleteGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ObsoleteGui.java?rev=1380351&r1=1380350&r2=1380351&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/ObsoleteGui.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/ObsoleteGui.java Mon Sep  3 20:41:37
2012
@@ -36,7 +36,7 @@ public class ObsoleteGui extends Abstrac
 
     private static final long serialVersionUID = 240L;
 
-    private JLabel obsoleteMessage =
+    private final JLabel obsoleteMessage =
         new JLabel(JMeterUtils.getResString("obsolete_test_element")); // $NON-NLS-1$
 
     public ObsoleteGui(){

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java?rev=1380351&r1=1380350&r2=1380351&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/RowDetailDialog.java Mon Sep  3 20:41:37
2012
@@ -64,14 +64,10 @@ public class RowDetailDialog extends JDi
 
     private JLabeledTextArea valueTA;
 
-    private JButton updateButton;
-
     private JButton nextButton;
 
     private JButton previousButton;
 
-    private JButton closeButton;
-
     private ObjectTableModel tableModel;
 
     private int selectedRow;
@@ -83,7 +79,7 @@ public class RowDetailDialog extends JDi
 	/**
 	 * Hide Window on ESC
 	 */
-	private transient ActionListener enterActionListener = new ActionListener() {
+	private final transient ActionListener enterActionListener = new ActionListener() {
 		public void actionPerformed(ActionEvent actionEvent) {
 			doUpdate(actionEvent);
 			setVisible(false);
@@ -93,7 +89,7 @@ public class RowDetailDialog extends JDi
 	/**
 	 * Do search on Enter
 	 */
-	private transient ActionListener escapeActionListener = new ActionListener() {
+	private final transient ActionListener escapeActionListener = new ActionListener() {
 		public void actionPerformed(ActionEvent actionEvent) {
 			setVisible(false);
 		}	
@@ -126,10 +122,10 @@ public class RowDetailDialog extends JDi
 
         JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
         
-        updateButton = new JButton(JMeterUtils.getResString("update")); //$NON-NLS-1$
+        JButton updateButton = new JButton(JMeterUtils.getResString("update")); //$NON-NLS-1$
         updateButton.setActionCommand(UPDATE);
         updateButton.addActionListener(this);
-        closeButton = new JButton(JMeterUtils.getResString("close")); //$NON-NLS-1$
+        JButton closeButton = new JButton(JMeterUtils.getResString("close")); //$NON-NLS-1$
         closeButton.setActionCommand(CLOSE);
         closeButton.addActionListener(this);
         nextButton = new JButton(JMeterUtils.getResString("next")); //$NON-NLS-1$

Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java?rev=1380351&r1=1380350&r2=1380351&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java Mon Sep  3 20:41:37
2012
@@ -58,9 +58,6 @@ public class SimpleConfigGui extends Abs
     /** The model for the parameter table. */
     private PowerTableModel tableModel;
 
-    /** A button for adding new parameters to the table. */
-    private JButton add;
-
     /** A button for removing parameters from the table. */
     private JButton delete;
 
@@ -214,7 +211,8 @@ public class SimpleConfigGui extends Abs
      * @return a GUI panel containing the buttons
      */
     private JPanel createButtonPanel() {
-        add = new JButton(JMeterUtils.getResString("add")); //$NON-NLS-1$
+        /** A button for adding new parameters to the table. */
+        JButton add = new JButton(JMeterUtils.getResString("add")); //$NON-NLS-1$
         add.setActionCommand(ADD);
         add.addActionListener(this);
         add.setEnabled(true);



Mime
View raw message