Skip to content

Commit

Permalink
style: run "field can be static"
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed May 1, 2023
1 parent 60e2816 commit 4ca844f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ if (buildParameters.enableErrorprone) {
// "FieldCanBeFinal",
"ForEachIterable",
"FieldCanBeFinal",
"FieldCanBeStatic",
"MethodCanBeStatic",
)
disable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class UserParametersGui extends AbstractPreProcessorGui {

private PowerTableModel tableModel;

private final int numUserColumns = 1;
private static final int numUserColumns = 1;

private JButton addParameterButton;
private JButton addUserButton;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ public class StatGraphVisualizer extends AbstractVisualizer implements Clearable

private boolean saveGraphToFile = false;

private final int defaultWidth = 400;
private static final int defaultWidth = 400;

private final int defaultHeight = 300;
private static final int defaultHeight = 300;

private final JComboBox<String> columnsList = new JComboBox<>(getLabels(GRAPH_COLUMNS, getGraphColumnsMsgParameters()));

Expand Down Expand Up @@ -253,7 +253,7 @@ public class StatGraphVisualizer extends AbstractVisualizer implements Clearable
// Default checked
private final JCheckBox valueLabelsVertical = new JCheckBox(JMeterUtils.getResString("aggregate_graph_value_labels_vertical"), true); // $NON-NLS-1$

private final Color colorBarGraph = Color.YELLOW;
private final static Color colorBarGraph = Color.YELLOW;

private Color colorForeGraph = Color.BLACK;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ public class SampleSaveConfiguration implements Cloneable, Serializable {
private boolean idleTime = IDLE_TIME;

// Does not appear to be used (yet)
// it is
@SuppressWarnings("FieldCanBeStatic")
private final int assertionsResultsToSave = ASSERTIONS_RESULT_TO_SAVE;

// Don't save this, as it is derived from the time format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class RandomDate extends AbstractFunction {

// Ensure that these are set, even if no parameters are provided
private Locale locale = JMeterUtils.getLocale(); // $NON-NLS-1$
private final ZoneId systemDefaultZoneID = ZoneId.systemDefault(); // $NON-NLS-1$
private static final ZoneId systemDefaultZoneID = ZoneId.systemDefault(); // $NON-NLS-1$
private CompoundVariable[] values;

private static final class LocaleFormatObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class TimeShift extends AbstractFunction {
private CompoundVariable amountToShiftCompound; // $NON-NLS-1$
private Locale locale = JMeterUtils.getLocale(); // $NON-NLS-1$
private String variableName = ""; //$NON-NLS-1$
private final ZoneId systemDefaultZoneID = ZoneId.systemDefault();
private static final ZoneId systemDefaultZoneID = ZoneId.systemDefault();


private static final class LocaleFormatObject {
Expand Down

0 comments on commit 4ca844f

Please sign in to comment.