Skip to content

Commit 46180ee

Browse files
committed
PMD: Inline field
1 parent ab48054 commit 46180ee

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/main/java/software/xdev/saveactions/ui/Configuration.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ public class Configuration implements Configurable
5656
private final Map<Action, JCheckBox> checkboxes = new EnumMap<>(Action.class);
5757
private final ActionListener checkboxActionListener = this::updateCheckboxEnabled;
5858

59-
private GeneralPanel generalPanel;
60-
private FormattingPanel formattingPanel;
6159
private BuildPanel buildPanel;
62-
private InspectionPanel inspectionPanel;
6360
private FileMaskPanel fileMasksExclusionPanel;
6461
private FileMaskPanel fileMasksInclusionPanel;
6562
private IdeSupportPanel ideSupport;
@@ -159,10 +156,7 @@ public void disposeUIResources()
159156
this.exclusions.clear();
160157
this.inclusions.clear();
161158
this.quickLists.clear();
162-
this.generalPanel = null;
163-
this.formattingPanel = null;
164159
this.buildPanel = null;
165-
this.inspectionPanel = null;
166160
this.fileMasksInclusionPanel = null;
167161
this.fileMasksExclusionPanel = null;
168162
this.ideSupport = null;
@@ -188,18 +182,18 @@ private JPanel initComponent()
188182
{
189183
this.checkboxes.put(action, new JCheckBox(action.getText()));
190184
}
191-
this.generalPanel = new GeneralPanel(this.checkboxes);
192-
this.formattingPanel = new FormattingPanel(this.checkboxes);
185+
final GeneralPanel generalPanel = new GeneralPanel(this.checkboxes);
186+
final FormattingPanel formattingPanel = new FormattingPanel(this.checkboxes);
193187
this.buildPanel = new BuildPanel(this.checkboxes, this.quickLists);
194-
this.inspectionPanel = new InspectionPanel(this.checkboxes);
188+
final InspectionPanel inspectionPanel = new InspectionPanel(this.checkboxes);
195189
this.fileMasksInclusionPanel = new FileMaskInclusionPanel(this.inclusions);
196190
this.fileMasksExclusionPanel = new FileMaskExclusionPanel(this.exclusions);
197191
this.ideSupport = new IdeSupportPanel();
198192
return this.initRootPanel(
199-
this.generalPanel.getPanel(),
200-
this.formattingPanel.getPanel(),
193+
generalPanel.getPanel(),
194+
formattingPanel.getPanel(),
201195
this.buildPanel.getPanel(),
202-
this.inspectionPanel.getPanel(),
196+
inspectionPanel.getPanel(),
203197
this.fileMasksInclusionPanel.getPanel(),
204198
this.fileMasksExclusionPanel.getPanel(),
205199
this.ideSupport.getPanel(this.storage.getConfigurationPath())
@@ -208,8 +202,12 @@ private JPanel initComponent()
208202

209203
@SuppressWarnings("checkstyle:MagicNumber")
210204
private JPanel initRootPanel(
211-
final JPanel general, final JPanel actions, final JPanel build, final JPanel inspections,
212-
final JPanel fileMasksInclusions, final JPanel fileMasksExclusions,
205+
final JPanel general,
206+
final JPanel actions,
207+
final JPanel build,
208+
final JPanel inspections,
209+
final JPanel fileMasksInclusions,
210+
final JPanel fileMasksExclusions,
213211
final JPanel ideSupport)
214212
{
215213
final JPanel panel = new JPanel();

0 commit comments

Comments
 (0)