Since 2.8.x LinkedHashMap keys are not denormalized, so all the keys are converted to lowercase. This breaks our application. If we use Map instead of LinkedHashMap the keys are denormalized correctly. We are using two yaml file sources.
This test fails:
class DenormalizedLinkedHashMapKeysTest : FunSpec({
data class Foo(
val xVal: String = "x"
)
data class LinkedHashMapContainer(
val m: LinkedHashMap<String, Foo> = linkedMapOf()
)
test("should set denormalized map keys and decode a data class inside a linked hash map") {
val config = ConfigLoaderBuilder.default()
.addResourceOrFileSource("/test_data_class_in_map.yaml")
.build()
.loadConfigOrThrow<LinkedHashMapContainer>()
config shouldBe LinkedHashMapContainer(
m = linkedMapOf(
"DC1" to Foo("10"),
"DC2" to Foo("20"),
)
)
}
})
Since 2.8.x LinkedHashMap keys are not denormalized, so all the keys are converted to lowercase. This breaks our application. If we use Map instead of LinkedHashMap the keys are denormalized correctly. We are using two yaml file sources.
This test fails: