Skip to content

Commit

Permalink
[JENKINS-48232] fix findbugs and NullpointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
fcojfernandez committed Nov 27, 2017
1 parent 881987a commit 4f48419
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static <C, U extends StandardUsernameCredentials> SSHAuthenticator<C, U>
*/
private static List<SSHAuthenticatorFactory> lookupFactories() {
// TODO once Jenkins core has a class that can be used to detect running on build agent use that to gate instead
return Jenkins.getInstance() == null ? null : ExtensionList.lookup(SSHAuthenticatorFactory.class);
return Jenkins.getInstanceOrNull() == null ? null : ExtensionList.lookup(SSHAuthenticatorFactory.class);
}

/**
Expand Down

0 comments on commit 4f48419

Please sign in to comment.