3
3
import java .io .IOException ;
4
4
import java .util .ArrayList ;
5
5
import java .util .Collections ;
6
+ import java .util .HashSet ;
6
7
import java .util .List ;
7
8
import java .util .Objects ;
9
+ import java .util .Set ;
8
10
9
11
import edu .umd .cs .findbugs .annotations .NonNull ;
10
12
11
13
import org .apache .http .HttpHeaders ;
12
- import org .jenkinsci .plugins .workflow .steps .AbstractStepDescriptorImpl ;
13
14
import org .jenkinsci .plugins .workflow .steps .Step ;
14
15
import org .jenkinsci .plugins .workflow .steps .StepContext ;
16
+ import org .jenkinsci .plugins .workflow .steps .StepDescriptor ;
15
17
import org .jenkinsci .plugins .workflow .steps .StepExecution ;
16
18
import org .jenkinsci .plugins .workflow .steps .SynchronousNonBlockingStepExecution ;
17
19
import org .kohsuke .stapler .AncestorInPath ;
@@ -289,7 +291,7 @@ List<HttpRequestNameValuePair> resolveHeaders() {
289
291
}
290
292
291
293
@ Extension
292
- public static final class DescriptorImpl extends AbstractStepDescriptorImpl {
294
+ public static final class DescriptorImpl extends StepDescriptor {
293
295
public static final boolean ignoreSslErrors = HttpRequest .DescriptorImpl .ignoreSslErrors ;
294
296
public static final HttpMode httpMode = HttpRequest .DescriptorImpl .httpMode ;
295
297
public static final String httpProxy = HttpRequest .DescriptorImpl .httpProxy ;
@@ -312,8 +314,11 @@ public static final class DescriptorImpl extends AbstractStepDescriptorImpl {
312
314
public static final String outputFile = "" ;
313
315
public static final ResponseHandle responseHandle = ResponseHandle .STRING ;
314
316
315
- public DescriptorImpl () {
316
- super (Execution .class );
317
+ @ Override
318
+ public Set <? extends Class <?>> getRequiredContext () {
319
+ Set <Class <?>> context = new HashSet <>();
320
+ Collections .addAll (context , Run .class , TaskListener .class );
321
+ return Collections .unmodifiableSet (context );
317
322
}
318
323
319
324
@ Override
0 commit comments