Skip to content

Commit

Permalink
Fix remaining MS_SHOULD_BE_FINAL SpotBugs violations (jenkinsci#6141)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jan 2, 2022
1 parent f82d167 commit e61ade1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions core/src/main/java/hudson/FilePath.java
Original file line number Diff line number Diff line change
Expand Up @@ -3308,8 +3308,9 @@ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFound

private static final long serialVersionUID = 1L;

@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "TODO needs triage")
public static int SIDE_BUFFER_SIZE = 1024;
@Restricted(NoExternalUse.class)
@RestrictedSince("TODO")
public static final int SIDE_BUFFER_SIZE = 1024;

private static final Logger LOGGER = Logger.getLogger(FilePath.class.getName());

Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -1656,11 +1656,11 @@ Descriptor<T> findDescriptor(String shortClassName, Collection<? extends Descrip
}

protected void updateNewComputer(Node n) {
updateNewComputer(n, AUTOMATIC_SLAVE_LAUNCH);
updateNewComputer(n, AUTOMATIC_AGENT_LAUNCH);
}

protected void updateComputerList() {
updateComputerList(AUTOMATIC_SLAVE_LAUNCH);
updateComputerList(AUTOMATIC_AGENT_LAUNCH);
}

/** @deprecated Use {@link SCMListener#all} instead. */
Expand Down Expand Up @@ -5503,8 +5503,8 @@ public boolean shouldShowStackTrace() {
/**
* Automatically try to launch an agent when Jenkins is initialized or a new agent computer is created.
*/
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "TODO needs triage")
public static boolean AUTOMATIC_SLAVE_LAUNCH = true;
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "for script console")
public static boolean AUTOMATIC_AGENT_LAUNCH = SystemProperties.getBoolean(Jenkins.class.getName() + ".automaticAgentLaunch", true);

private static final Logger LOGGER = Logger.getLogger(Jenkins.class.getName());
private static final SecureRandom RANDOM = new SecureRandom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
package jenkins.model.item_category;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.RestrictedSince;
import hudson.model.TopLevelItemDescriptor;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
Expand All @@ -47,8 +47,8 @@ public abstract class ItemCategory implements ExtensionPoint {
* See <a href="https://issues.jenkins.io/browse/JENKINS-36593">JENKINS-36593</a> for more info.
*/
@Restricted(NoExternalUse.class)
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "TODO needs triage")
public static int MIN_TOSHOW = 1;
@RestrictedSince("2.14")
public static final int MIN_TOSHOW = 1;

/**
* Helpful to set the order.
Expand Down

0 comments on commit e61ade1

Please sign in to comment.