-
-
Notifications
You must be signed in to change notification settings - Fork 180
Closed
Description
Describe the bug
Deserializing "null" string as non-null enum gives null value.
To Reproduce
enum class SocialMediaPlatform {INSTAGRAM, FACEBOOK, YOUTUBE, TWITCH}
fun main() {
val json = "null"
val enum : SocialMediaPlatform = ObjectMapper().readValue(json)
println(enum == null)
}
this snippet prints true
Expected behavior
Snippet should throw exception
Versions
Kotlin: 1.3.72
Jackson-module-kotlin: 2.11.2
Jackson-databind: 2.11.0