You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Deserializing an empty object {} with reference Type Unit? leads to a new instance of kotlin.Unit instead of the singleton kotlin.Unit instance.
To Reproduce assertSame(jacksonObjectMapper().readValue<Unit?>("{}"), Unit) or see submitted PR #519 with failing test.
Expected behavior
Deserialization to thekotlin.Unit singleton.
Describe the bug
Deserializing an empty object
{}
with reference TypeUnit?
leads to a new instance ofkotlin.Unit
instead of the singletonkotlin.Unit
instance.To Reproduce
assertSame(jacksonObjectMapper().readValue<Unit?>("{}"), Unit)
or see submitted PR #519 with failing test.Expected behavior
Deserialization to the
kotlin.Unit
singleton.Versions
Kotlin: 1.5.31
Jackson-module-kotlin: 2.13.0
Jackson-databind: 2.13.0
Additional context
kotlin.Unit
singleton as new instances. #196singletonSupport
it works as expected but I guess since it works forUnit
without enabling this feature, it should work forUnit?
too.The text was updated successfully, but these errors were encountered: