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 3dfefde commit a7248f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.15</version>
<version>2.33</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down Expand Up @@ -40,12 +40,13 @@
<properties>
<jenkins.version>1.642.3</jenkins.version>
<scm-api.version>2.0.7</scm-api.version>
<workflow-step-api-plugin.version>2.13-20170904.014626-1</workflow-step-api-plugin.version> <!-- TODO https://github.com/jenkinsci/workflow-step-api-plugin/pull/30 -->
</properties>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.3</version>
<version>${workflow-step-api-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand All @@ -66,7 +67,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.3</version>
<version>${workflow-step-api-plugin.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
Expand Down
Expand Up @@ -170,7 +170,7 @@ private List<ParameterValue> completeDefaultParameters(List<ParameterValue> para

@SuppressFBWarnings(value="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification="TODO 1.653+ switch to Jenkins.getInstanceOrNull")
@Override
public void stop(Throwable cause) {
public void stop(Throwable cause) throws Exception {
StepContext context = getContext();
Jenkins jenkins = Jenkins.getInstance();
if (jenkins == null) {
Expand Down Expand Up @@ -208,7 +208,7 @@ public void stop(Throwable cause) {
}

if (!interrupted) {
context.onFailure(cause);
super.stop(cause);
}
}
private static boolean maybeInterrupt(Executor e, Throwable cause, StepContext context) {
Expand Down

0 comments on commit a7248f0

Please sign in to comment.