Skip to content

[BUG] ObjectMapper.readValue<T>(...) breaks null safety #399

Closed
FasterXML/jackson-databind
#5069
@revintec

Description

@revintec

image
Jackson-module-kotlin version 2.9.7, newer version should experience the same problem

changing original source code inline fun <reified T> ObjectMapper.readValue(content: String): T = readValue(content, jacksonTypeRef<T>()) adds trailing ... as T would fix the problem, however this way it provides poor exception message
Exception in thread "main" java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Any

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions