Skip to content

Commit

Permalink
Merge pull request #931 from jglick/parallelErrorPost-JENKINS-73726
Browse files Browse the repository at this point in the history
[JENKINS-73726] Avoid NPE trying to cancel a block which is already done
  • Loading branch information
jglick authored Sep 5, 2024
2 parents 3761c26 + 27eb8b8 commit 8cd52a7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ public boolean cancel(Throwable error) {
t.getExecution().runInCpsVmThread(new FutureCallback<>() {
@Override
public void onSuccess(CpsThreadGroup g) {
if (thread == null) {
return;
}
// Similar to getCurrentExecutions but we want the raw CpsThread, not a StepExecution; cf. CpsFlowExecution.interrupt
Map<FlowHead, CpsThread> m = new LinkedHashMap<>();
for (CpsThread t : thread.group.getThreads()) {
Expand Down

0 comments on commit 8cd52a7

Please sign in to comment.