Skip to content

Commit

Permalink
[JENKINS-26148] Using default implementation of StepExecution.stop.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Sep 4, 2017
1 parent a1fa5a5 commit 4092168
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Expand Up @@ -71,23 +71,15 @@ public DescriptorImpl() {

public static final class ScriptStepExecution extends AbstractStepExecutionImpl {

private BodyExecution body;

@Override
public boolean start() throws Exception {

body = getContext().newBodyInvoker()
getContext().newBodyInvoker()
.withCallback(BodyExecutionCallback.wrap(getContext()))
.start();
return false;
}

@Override
public void stop(Throwable cause) throws Exception {
if (body != null)
body.cancel(cause);
}

private static final long serialVersionUID = 1L;
}
}
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -206,7 +206,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.10</version>
<version>2.13-20170904.014626-1</version> <!-- TODO https://github.com/jenkinsci/workflow-step-api-plugin/pull/30 -->
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down

0 comments on commit 4092168

Please sign in to comment.