Skip to content

Commit 4f48419

Browse files
committed
[JENKINS-48232] fix findbugs and NullpointerException
1 parent 881987a commit 4f48419

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/SSHAuthenticator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public static <C, U extends StandardUsernameCredentials> SSHAuthenticator<C, U>
232232
*/
233233
private static List<SSHAuthenticatorFactory> lookupFactories() {
234234
// TODO once Jenkins core has a class that can be used to detect running on build agent use that to gate instead
235-
return Jenkins.getInstance() == null ? null : ExtensionList.lookup(SSHAuthenticatorFactory.class);
235+
return Jenkins.getInstanceOrNull() == null ? null : ExtensionList.lookup(SSHAuthenticatorFactory.class);
236236
}
237237

238238
/**

0 commit comments

Comments
 (0)