jjb: Fix crash when launching new jobs from the the system trigger
authorKienan Stewart <kstewart@efficios.com>
Thu, 25 May 2023 16:00:36 +0000 (12:00 -0400)
committerKienan Stewart <kstewart@efficios.com>
Thu, 25 May 2023 18:25:38 +0000 (14:25 -0400)
commitc500f461a36bd03e8499db0b441324087b81ca03
tree88c5613d13c2cd431a026aac32a41b3a1596e5c6
parent0c50633c4c844534e40eb4f990e844264a4dc552
jjb: Fix crash when launching new jobs from the the system trigger

ChoiceParameterDefinition does not have a method getDefaultValue().
However, getDefaultParameterValue() will return null if there is no
default, so the check can be altered.

C.f. https://javadoc.jenkins-ci.org/hudson/model/ParameterDefinition.html
C.f. https://javadoc.jenkins-ci.org/hudson/model/ChoiceParameterDefinition.html

Original crash:

```
ERROR: Build step failed with exception
groovy.lang.MissingMethodException: No signature of method:
hudson.model.ChoiceParameterDefinition.getDefaultValue() is applicable
for argument types: () values: []
...
at Script1$_run_closure8.doCall(Script1.groovy:276)
...
at Script1$_run_closure14.doCall(Script1.groovy:434)
...
```

Change-Id: I8847806b2abb556ff2b89aa772277b1318c507e1
scripts/system-tests/system-trigger.groovy
This page took 0.022866 seconds and 4 git commands to generate.