Skip to content
Permalink
Browse files

[JENKINS-43507] Fix trait drop-down list population

  • Loading branch information...
stephenc committed Jun 24, 2017
1 parent 1c1c664 commit 1743eab6b24a52e94847ae3f278c184d0f51eb47
@@ -25,11 +25,15 @@

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import jenkins.plugins.git.GitSCMBuilder;
import jenkins.plugins.git.GitSCMSource;
import jenkins.plugins.git.GitSCMSourceContext;
import jenkins.scm.api.SCMHead;
import jenkins.scm.api.SCMHeadCategory;
import jenkins.scm.api.SCMHeadOrigin;
import jenkins.scm.api.SCMRevision;
import jenkins.scm.api.SCMSource;
import jenkins.scm.api.trait.SCMBuilder;
import jenkins.scm.api.trait.SCMHeadAuthority;
import jenkins.scm.api.trait.SCMHeadAuthorityDescriptor;
import jenkins.scm.api.trait.SCMSourceContext;
@@ -89,8 +93,24 @@ public String getDisplayName() {
* {@inheritDoc}
*/
@Override
public boolean isApplicableToContext(@NonNull Class<? extends SCMSourceContext> contextClass) {
return GitSCMSourceContext.class.isAssignableFrom(contextClass);
public Class<? extends SCMBuilder> getBuilderClass() {
return GitSCMBuilder.class;
}

/**
* {@inheritDoc}
*/
@Override
public Class<? extends SCMSourceContext> getContextClass() {
return GitSCMSourceContext.class;
}

/**
* {@inheritDoc}
*/
@Override
public Class<? extends SCMSource> getSourceClass() {
return GitSCMSource.class;
}
}

@@ -169,14 +169,6 @@ protected GitSCMExtensionTraitDescriptor() {
return GitSCMBuilder.class;
}

/**
* {@inheritDoc}
*/
@Override
public Class<? extends SCMSourceContext> getContextClass() {
return GitSCMSourceContext.class;
}

/**
* {@inheritDoc}
*/

0 comments on commit 1743eab

Please sign in to comment.
You can’t perform that action at this time.