Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/962#discussion_r186257989
--- Diff:
rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/ConfigSummary.java
---
@@ -114,7 +116,8 @@ public ConfigSummary(ConfigKey<?> config, String label,
Double priority, Boolean
: ImmutableList.<String>of();
if (config.getType().isEnum()) {
this.type = Enum.class.getName();
- this.defaultValue = (config.getDefaultValue() == null) ? null
: ((Enum<?>) config.getDefaultValue()).name();
+ this.defaultValue = config.getDefaultValue() instanceof Enum?
((Enum<?>) config.getDefaultValue()).name() :
--- End diff --
if it's null the check returns false and it calls to
`convertToJsonPrimitive` which accepts null.
---