Skip to content

Commit

Permalink
Merge pull request #79 from jglick/Object-parameter-JENKINS-28385
Browse files Browse the repository at this point in the history
[JENKINS-28385] Gracefully handle Describable attributes of type Object
  • Loading branch information
jglick committed Oct 28, 2016
2 parents c56e0c5 + 65bf6c7 commit 4c00f99
Showing 1 changed file with 11 additions and 8 deletions.
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 4c00f99

Please sign in to comment.