Skip to content

Commit b8050d6

Browse files
authored
jenkinsci/plugin-pom#869 or a subsequent pull (#465)
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.
1 parent 64ee6bf commit b8050d6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main/java/hudson/plugins/sshslaves/SSHConnector.java

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.cloudbees.plugins.credentials.common.StandardUsernameListBoxModel;
3030
import com.trilead.ssh2.Connection;
3131
import edu.umd.cs.findbugs.annotations.NonNull;
32+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
3233
import hudson.Extension;
3334
import hudson.model.ItemGroup;
3435
import hudson.model.TaskListener;
@@ -69,6 +70,7 @@ public class SSHConnector extends ComputerConnector {
6970
/**
7071
* Field port
7172
*/
73+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
7274
public int port;
7375

7476
/**

src/main/java/hudson/plugins/sshslaves/SSHLauncher.java

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import com.trilead.ssh2.jenkins.SFTPClient;
4040
import edu.umd.cs.findbugs.annotations.CheckForNull;
4141
import edu.umd.cs.findbugs.annotations.NonNull;
42+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4243
import hudson.AbortException;
4344
import hudson.EnvVars;
4445
import hudson.Extension;
@@ -152,6 +153,7 @@ public class SSHLauncher extends ComputerLauncher {
152153
/**
153154
* Field javaPath.
154155
*/
156+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
155157
public String javaPath;
156158

157159
/**
@@ -173,26 +175,31 @@ public class SSHLauncher extends ComputerLauncher {
173175
/**
174176
* Field prefixStartSlaveCmd.
175177
*/
178+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
176179
public String prefixStartSlaveCmd;
177180

178181
/**
179182
* Field suffixStartSlaveCmd.
180183
*/
184+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
181185
public String suffixStartSlaveCmd;
182186

183187
/**
184188
* Field launchTimeoutSeconds.
185189
*/
190+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
186191
public Integer launchTimeoutSeconds;
187192

188193
/**
189194
* Field maxNumRetries.
190195
*/
196+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
191197
public Integer maxNumRetries;
192198

193199
/**
194200
* Field retryWaitTime (seconds).
195201
*/
202+
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.")
196203
public Integer retryWaitTime;
197204

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

0 commit comments

Comments
 (0)