File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
ktor-server/ktor-server-core/jvmAndNix/src/io/ktor/server/config Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ internal class MergedApplicationConfig(
4040) : ApplicationConfig {
4141
4242 private val firstKeys by lazy { first.keys() }
43+ private val secondKeys by lazy { second.keys() }
4344
4445 override fun property (path : String ): ApplicationConfigValue = when {
4546 firstKeys.contains(path) -> first.property(path)
@@ -53,17 +54,17 @@ internal class MergedApplicationConfig(
5354
5455 override fun config (path : String ): ApplicationConfig {
5556 if (firstKeys.none { it.startsWith(" $path ." ) }) return second.config(path)
56- if (second.keys() .none { it.startsWith(" $path ." ) }) return first.config(path)
57+ if (secondKeys .none { it.startsWith(" $path ." ) }) return first.config(path)
5758 return MergedApplicationConfig (first.config(path), second.config(path))
5859 }
5960
6061 override fun configList (path : String ): List <ApplicationConfig > {
6162 val firstList = if (firstKeys.contains(path)) first.configList(path) else emptyList()
62- val secondList = if (second.keys() .contains(path)) second.configList(path) else emptyList()
63+ val secondList = if (secondKeys .contains(path)) second.configList(path) else emptyList()
6364 return firstList + secondList
6465 }
6566
66- override fun keys (): Set <String > = firstKeys + second.keys()
67+ override fun keys (): Set <String > = firstKeys + secondKeys
6768
6869 override fun toMap (): Map <String , Any ?> = second.toMap() + first.toMap()
6970}
You can’t perform that action at this time.
0 commit comments