From d23b3b326094f15bee2d87d394971874e9a1372d Mon Sep 17 00:00:00 2001 From: Wouter Zelle Date: Fri, 19 Oct 2007 08:03:30 +0000 Subject: [PATCH] SingularField violations fixed git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5557 51baf565-9d33-0410-a72c-fc3788e3496d --- .../net/sourceforge/pmd/util/viewer/gui/MainFrame.java | 8 +++----- .../pmd/util/viewer/gui/ParseExceptionHandler.java | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pmd/src/net/sourceforge/pmd/util/viewer/gui/MainFrame.java b/pmd/src/net/sourceforge/pmd/util/viewer/gui/MainFrame.java index c940eea11b..86dc0d2ed5 100644 --- a/pmd/src/net/sourceforge/pmd/util/viewer/gui/MainFrame.java +++ b/pmd/src/net/sourceforge/pmd/util/viewer/gui/MainFrame.java @@ -30,14 +30,12 @@ public class MainFrame implements ActionListener, ActionCommands, ViewerModelListener { private ViewerModel model; private SourceCodePanel sourcePanel; - private ASTPanel astPanel; private XPathPanel xPathPanel; - private JButton compileBtn; private JButton evalBtn; private JLabel statusLbl; private JRadioButtonMenuItem jdk13MenuItem; private JRadioButtonMenuItem jdk14MenuItem; - private JRadioButtonMenuItem jdk15MenuItem; + private JRadioButtonMenuItem jdk15MenuItem; //NOPMD private JRadioButtonMenuItem jdk16MenuItem; /** @@ -52,7 +50,7 @@ public class MainFrame model = new ViewerModel(); model.addViewerModelListener(this); sourcePanel = new SourceCodePanel(model); - astPanel = new ASTPanel(model); + ASTPanel astPanel = new ASTPanel(model); xPathPanel = new XPathPanel(model); getContentPane().setLayout(new BorderLayout()); JSplitPane editingPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sourcePanel, astPanel); @@ -61,7 +59,7 @@ public class MainFrame interactionsPane.add(xPathPanel, BorderLayout.SOUTH); interactionsPane.add(editingPane, BorderLayout.CENTER); getContentPane().add(interactionsPane, BorderLayout.CENTER); - compileBtn = new JButton(NLS.nls("MAIN.FRAME.COMPILE_BUTTON.TITLE")); + JButton compileBtn = new JButton(NLS.nls("MAIN.FRAME.COMPILE_BUTTON.TITLE")); compileBtn.setActionCommand(COMPILE_ACTION); compileBtn.addActionListener(this); evalBtn = new JButton(NLS.nls("MAIN.FRAME.EVALUATE_BUTTON.TITLE")); diff --git a/pmd/src/net/sourceforge/pmd/util/viewer/gui/ParseExceptionHandler.java b/pmd/src/net/sourceforge/pmd/util/viewer/gui/ParseExceptionHandler.java index dfdb664b68..3ddd0549c1 100644 --- a/pmd/src/net/sourceforge/pmd/util/viewer/gui/ParseExceptionHandler.java +++ b/pmd/src/net/sourceforge/pmd/util/viewer/gui/ParseExceptionHandler.java @@ -19,7 +19,6 @@ import java.awt.event.ActionListener; public class ParseExceptionHandler extends JDialog implements ActionListener { private Exception exc; - private JTextArea errorArea; private JButton okBtn; /** @@ -35,7 +34,7 @@ public class ParseExceptionHandler extends JDialog implements ActionListener { } private void init() { - errorArea = new JTextArea(); + JTextArea errorArea = new JTextArea(); errorArea.setEditable(false); errorArea.setText(exc.getMessage() + "\n"); getContentPane().setLayout(new BorderLayout());