Treat empty property values as empty list, not as list of an empty string.
This commit is contained in:
committed by
alexander-gorshenev
parent
ddf8d4cc4d
commit
11a11378ff
@@ -48,6 +48,8 @@ fun Properties.propertyString(key: String, suffix: String? = null): String?
|
||||
*/
|
||||
fun Properties.propertyList(key: String, suffix: String? = null): List<String> {
|
||||
val value = this.getProperty(key.suffix(suffix)) ?: this.getProperty(key)
|
||||
if (value?.isBlank() == true) return emptyList()
|
||||
|
||||
return value?.split(' ') ?: emptyList()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user