Charles Chan
Committed by Gerrit Code Review

Bugfix: default value is not applied to config correctly

This could further cause NPE somewhere else where a default value is expected

Change-Id: I71c8f87b5e25b6e5445e03527ee82d84ff05086c
......@@ -322,7 +322,7 @@ public abstract class Config<S> {
*/
protected <E extends Enum<E>> E get(String name, E defaultValue, Class<E> enumClass) {
if (defaultValue != null) {
Enum.valueOf(enumClass, object.path(name).asText(defaultValue.toString()));
return Enum.valueOf(enumClass, object.path(name).asText(defaultValue.toString()));
}
JsonNode node = object.get(name);
......