Skip to content
Permalink
Browse files
[JENKINS-35562] Fix findbugs issues from core upgrade
  • Loading branch information
stephenc committed Jun 10, 2016
1 parent ccef22d commit 4d487bd9b1f4a1f3a4a09c8dcc5a292692b9be65
@@ -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;
}
@@ -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;
@@ -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);
}

/**

0 comments on commit 4d487bd

Please sign in to comment.