problem: unable to run without default options

This commit is contained in:
Igor Artamonov
2019-08-21 17:39:20 -04:00
parent 8a99212fc5
commit 6716abfb4d
3 changed files with 34 additions and 1 deletions

View File

@@ -201,7 +201,8 @@ class UpstreamsConfigReader {
}
private fun <T> getList(mappingNode: MappingNode?, key: String): CollectionNode<T>? {
return getValue(mappingNode, key, CollectionNode::class.java) as CollectionNode<T>
val value = getValue(mappingNode, key, CollectionNode::class.java) ?: return null
return value as CollectionNode<T>
}
private fun getListOfString(mappingNode: MappingNode?, key: String): List<String>? {