Skip to content

Commit

Permalink
Fix PMD failures for FinalFieldCouldBeStatic
Browse files Browse the repository at this point in the history
(cherry picked from commit 662b02e3d2973b98c1051b6c986832c2e85eceaf)
  • Loading branch information
crammond authored and melxin committed Jun 25, 2024
1 parent b4cd1a0 commit 951b6ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class ChatFilterPlugin extends Plugin
MODCHAT
);

private final CharMatcher jagexPrintableCharMatcher = Text.JAGEX_PRINTABLE_CHAR_MATCHER;
private static final CharMatcher jagexPrintableCharMatcher = Text.JAGEX_PRINTABLE_CHAR_MATCHER;
private List<Pattern> filteredPatterns = Collections.emptyList();
private List<Pattern> filteredNamePatterns = Collections.emptyList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ enum HealthbarOverride implements SpriteOverride
private final String fileName;

@Getter
@SuppressWarnings("PMD.FinalFieldCouldBeStatic")
private final int padding = 1;

private static final Map<Integer, HealthbarOverride> MAP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ public void startCreation(Point location, Dimension size)
currentMarker = new ScreenMarker(
Instant.now().toEpochMilli(),
DEFAULT_MARKER_NAME + " " + (screenMarkers.size() + 1),
pluginPanel.getSelectedBorderThickness(),
pluginPanel.getSelectedColor(),
pluginPanel.getSelectedFillColor(),
ScreenMarkerPluginPanel.SELECTED_BORDER_THICKNESS,
ScreenMarkerPluginPanel.SELECTED_COLOR,
ScreenMarkerPluginPanel.SELECTED_FILL_COLOR,
true,
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,17 @@ public class ScreenMarkerPluginPanel extends PluginPanel

private static final int DEFAULT_BORDER_THICKNESS = 3;

public static final Color SELECTED_COLOR = DEFAULT_BORDER_COLOR;
public static final Color SELECTED_FILL_COLOR = DEFAULT_FILL_COLOR;
public static final int SELECTED_BORDER_THICKNESS = DEFAULT_BORDER_THICKNESS;

private final JLabel addMarker = new JLabel(ADD_ICON);
private final JLabel title = new JLabel();
private final PluginErrorPanel noMarkersPanel = new PluginErrorPanel();
private final JPanel markerView = new JPanel(new GridBagLayout());

private final ScreenMarkerPlugin plugin;

@Getter
private final Color selectedColor = DEFAULT_BORDER_COLOR;

@Getter
private final Color selectedFillColor = DEFAULT_FILL_COLOR;

@Getter
private final int selectedBorderThickness = DEFAULT_BORDER_THICKNESS;

@Getter
private final ScreenMarkerCreationPanel creationPanel;

Expand Down

0 comments on commit 951b6ea

Please sign in to comment.