Skip to content

Commit

Permalink
[JENKINS-35562] Fix findbugs issues from core upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Jun 10, 2016
1 parent ccef22d commit 4d487bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -261,7 +261,7 @@ public static <C, U extends StandardUsernameCredentials> boolean isSupported(@No
@NonNull Class<U> userClass) {
connectionClass.getClass(); // throw NPE if null
userClass.getClass(); // throw NPE if null
for (SSHAuthenticatorFactory factory : Hudson.getInstance().getExtensionList(SSHAuthenticatorFactory.class)) {
for (SSHAuthenticatorFactory factory : ExtensionList.lookup(SSHAuthenticatorFactory.class)) {
if (factory.supports(connectionClass, userClass)) {
return true;
}
Expand Down
Expand Up @@ -36,6 +36,7 @@
import hudson.remoting.Channel;
import hudson.util.Secret;
import java.io.ObjectStreamException;
import jenkins.model.Jenkins;
import net.jcip.annotations.GuardedBy;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
Expand Down Expand Up @@ -199,7 +200,7 @@ public String getDisplayName() {
}

public DescriptorExtensionList<PrivateKeySource, Descriptor<PrivateKeySource>> getPrivateKeySources() {
return Hudson.getInstance().getDescriptorList(PrivateKeySource.class);
return Jenkins.getActiveInstance().getDescriptorList(PrivateKeySource.class);
}

/**
Expand Down

0 comments on commit 4d487bd

Please sign in to comment.