Hide package-visible instance fields. #1555

Fixes `PackageVisibleField` inspection violation.

Description:
>Reports package-visible instance variables. Constants (i.e. variables marked static and final) are not reported.
This commit is contained in:
Michal Kordas 2015-08-08 13:47:46 +02:00 committed by Roman Ivanov
parent d0ecc8cfbb
commit 3abc77ef3b
2 changed files with 9 additions and 5 deletions

View File

@ -34,7 +34,7 @@ public class Main {
/**
* Main frame
*/
static JFrame frame;
private static JFrame frame;
/**
* Entry point
@ -68,6 +68,10 @@ public class Main {
frame.setVisible(true);
}
static JFrame getFrame() {
return frame;
}
/**
* http://findbugs.sourceforge.net/bugDescriptions.html#SW_SWING_METHODS_INVOKED_IN_SWING_THREAD
*/
@ -75,7 +79,7 @@ public class Main {
/**
* frame
*/
final JFrame frame;
private final JFrame frame;
/**
* contstructor

View File

@ -163,7 +163,7 @@ public class ParseTreeInfoPanel extends JPanel {
public void openFile(File file, final Component parent) {
if (file != null) {
try {
Main.frame.setTitle("Checkstyle : " + file.getName());
Main.getFrame().setTitle("Checkstyle : " + file.getName());
final FileText text = new FileText(file.getAbsoluteFile(),
getEncoding());
final DetailAST parseTree = parseFile(text);
@ -298,12 +298,12 @@ public class ParseTreeInfoPanel extends JPanel {
/**
* frame
*/
final Component parent;
private final Component parent;
/**
* frame
*/
final String msg;
private final String msg;
/**
* contstructor