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
for (paramdef in job.getProperty(ParametersDefinitionProperty.class).getParameterDefinitions()) {
// If there is a default value for this parameter, use it. Don't use empty
// default value parameters.
- if (paramdef.getDefaultValue()) {
+ if (paramdef.getDefaultParameterValue() != null) {
params += paramdef.getDefaultParameterValue();
}
}