Skip to content

Commit 8b1fff4

Browse files
committed
Fix spotbugs
1 parent 525a483 commit 8b1fff4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/jenkins/plugins/pipelinegraphview/utils/PipelineGraphApi.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.jenkins.plugins.pipelinegraphview.utils;
22

3+
import org.jenkinsci.plugins.workflow.flow.FlowExecution;
34
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
45

56
import java.util.ArrayList;
@@ -105,7 +106,8 @@ public PipelineGraph createGraph() {
105106
})
106107
.filter(stage -> !stagesThatAreChildrenOrNestedStages.contains(stage.getId())).collect(Collectors.toList());
107108

108-
return new PipelineGraph(stageResults, run.getExecution().isComplete());
109+
FlowExecution execution = run.getExecution();
110+
return new PipelineGraph(stageResults, execution != null && execution.isComplete());
109111
}
110112

111113
private Function<Integer, PipelineStage> mapper(Map<Integer, PipelineStageInternal> stageMap, Map<Integer, List<Integer>> stageToChildrenMap) {

0 commit comments

Comments
 (0)