Skip to content

Commit

Permalink
Add null check for old descriptors that are not available anymore
Browse files Browse the repository at this point in the history
Happend with org.jenkinsci.plugins.workflow.steps.PushdStep that was moved
from workflow-basic-steps-plugin to org.jenkinsci.plugins.workflow.support.steps.PushdStep
in workflow-durable-task-step-plugin

jenkinsci/workflow-basic-steps-plugin#258
jenkinsci/workflow-durable-task-step-plugin#293
  • Loading branch information
froque committed Jun 28, 2023
1 parent e79f9d9 commit e4442f2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ private void processRun(Set<PluginWrapper> plugins, WorkflowRun lastBuild) {
if (f instanceof StepStartNode){
final StepStartNode startNode = (StepStartNode) f;
final StepDescriptor stepDescriptor = startNode.getDescriptor();
plugins.add(getPluginFromClass(stepDescriptor.clazz));
if (stepDescriptor != null) {
plugins.add(getPluginFromClass(stepDescriptor.clazz));
}
}
if (f instanceof StepAtomNode){
final StepAtomNode stepAtomNode = (StepAtomNode) f;
final StepDescriptor stepDescriptor = stepAtomNode.getDescriptor();
plugins.add(getPluginFromClass(stepDescriptor.clazz));
if (stepDescriptor != null) {
plugins.add(getPluginFromClass(stepDescriptor.clazz));
}

if (stepDescriptor.isMetaStep()) {
if (stepDescriptor instanceof CoreStep.DescriptorImpl) {
Expand Down

0 comments on commit e4442f2

Please sign in to comment.