Skip to content
Permalink
Browse files

Merge pull request #79 from jglick/Object-parameter-JENKINS-28385

[JENKINS-28385] Gracefully handle Describable attributes of type Object
  • Loading branch information
jglick committed Oct 28, 2016
2 parents c56e0c5 + 65bf6c7 commit 4c00f998882610b0229c2137837b5be9a42749df
Showing with 11 additions and 8 deletions.
  1. +11 −8 src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy
@@ -156,14 +156,17 @@ def describeType(ParameterType type, int headerLevel) throws Exception {
dl(class:'nested-choice-box nested') {
dt(_("Nested choice of objects"))
dd{

dl(class:'schema') {
for (Map.Entry<String, DescribableModel> entry : ((HeterogeneousObjectType) type).getTypes().entrySet()) {
dt {
code(DescribableModel.CLAZZ + ": '" + entry.key + "'")
}
dd{
generateHelp(entry.value, nextHeaderLevel);
if (type.actualType == Object) {
span(_("(not enumerable)"))
} else {
dl(class:'schema') {
for (Map.Entry<String, DescribableModel> entry : ((HeterogeneousObjectType) type).getTypes().entrySet()) {
dt {
code(DescribableModel.CLAZZ + ": '" + entry.key + "'")
}
dd{
generateHelp(entry.value, nextHeaderLevel);
}
}
}
}

0 comments on commit 4c00f99

Please sign in to comment.
You can’t perform that action at this time.