Skip to content

[0.20.0] Properties class fails to load data if the class contains size property #743

@rjaros

Description

@rjaros

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions