[properties] naive prioritize suffixed keys against unsuffixed

This commit is contained in:
Vasily Levchenko
2017-12-12 14:16:05 +03:00
committed by Vasily Levchenko
parent b6ca104bd0
commit dd39219ee4
@@ -38,8 +38,7 @@ fun File.saveProperties(properties: Properties) {
fun Properties.saveToFile(file: File) = file.saveProperties(this)
fun Properties.propertyString(key: String, suffix: String? = null): String?
= this.getProperty(key.suffix(suffix))
fun Properties.propertyString(key: String, suffix: String? = null): String? = getProperty(key.suffix(suffix)) ?: this.getProperty(key)
/**
* TODO: this method working with suffixes should be replaced with