Describe the bug
If deserialized class (or inner class) contains a size property, deserialization process fails with different exceptions (NullPointer, ArrayOutOfBounds, ClassCast). There was no error with the Mapper class in version 0.14.0.
To Reproduce
@Serializable
data class DataTest(
val p: String? = null,
val size: String? = null
)
// ...
Properties().loadNullable<DataTest>(mapOf("p" to "a", "size" to "b"))
throws ClassCastException
Expected behavior
No exception thrown. Correctly deserialized object should be returned.
Environment
- Kotlin version: 1.3.70
- Library version: 0.20.0
- Kotlin platforms: tested on JS but probably affects all platforms
- Gradle version: 6.0.1