Skip to content

Commit

Permalink
jenkinsci/plugin-pom#869 or a subsequent pull (#465)
Browse files Browse the repository at this point in the history
request that updates to 4.8.3 will need this change in the plugin to
resolve new spotbugs warnings that will be reported by spotbugs 4.8.2
and later.

Plugin pom 4.77 is likely to include that new version of spotbugs.

Confirmed that the spotbugs warnings are visible when using the
4.77-SNAPSHOT plugin pom before this change. With this change, the
spotbugs warnings are no longer visible.
  • Loading branch information
MarkEWaite authored Jan 16, 2024
1 parent 64ee6bf commit b8050d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/hudson/plugins/sshslaves/SSHConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.cloudbees.plugins.credentials.common.StandardUsernameListBoxModel;
import com.trilead.ssh2.Connection;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.model.ItemGroup;
import hudson.model.TaskListener;
Expand Down Expand Up @@ -69,6 +70,7 @@ public class SSHConnector extends ComputerConnector {
/**
* Field port
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public int port;

/**
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.trilead.ssh2.jenkins.SFTPClient;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.AbortException;
import hudson.EnvVars;
import hudson.Extension;
Expand Down Expand Up @@ -152,6 +153,7 @@ public class SSHLauncher extends ComputerLauncher {
/**
* Field javaPath.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public String javaPath;

/**
Expand All @@ -173,26 +175,31 @@ public class SSHLauncher extends ComputerLauncher {
/**
* Field prefixStartSlaveCmd.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public String prefixStartSlaveCmd;

/**
* Field suffixStartSlaveCmd.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public String suffixStartSlaveCmd;

/**
* Field launchTimeoutSeconds.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public Integer launchTimeoutSeconds;

/**
* Field maxNumRetries.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public Integer maxNumRetries;

/**
* Field retryWaitTime (seconds).
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
public Integer retryWaitTime;

// TODO: It is a bad idea to create a new Executor service for each launcher.

Check warning on line 205 in src/main/java/hudson/plugins/sshslaves/SSHLauncher.java

View check run for this annotation

ci.jenkins.io / Open Tasks Scanner

TODO

NORMAL: It is a bad idea to create a new Executor service for each launcher.
Expand Down

0 comments on commit b8050d6

Please sign in to comment.