Skip to content
Permalink
Browse files

[JENKINS-28150] Fix optional dependency loading

The extensions here that are using an optional dependency's class must
be mark as optional. If not, we can see `ClassNotFoundException` when
Jenkins load this plugin.
  • Loading branch information
alecharp committed Apr 29, 2015
1 parent 3804c3b commit 905dccb190e122dd68342f92e8b45f0a0414fea7
@@ -68,7 +68,7 @@ public boolean isApplicable(AbstractBuild build) {
return DESCRIPTOR;
}

@Extension
@Extension(optional = true)
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

public static class DescriptorImpl extends Descriptor<ConditionalTimeout> {
@@ -89,7 +89,7 @@ public long getTimeOut(Run run) {
return DESCRIPTOR;
}

@Extension
@Extension(optional = true)
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

public static class DescriptorImpl extends BuildTimeOutStrategyDescriptor {
@@ -76,7 +76,7 @@ public RunCondition getCondition() {
return condition;
}

@Extension
@Extension(optional = true)
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();

@Override

0 comments on commit 905dccb

Please sign in to comment.