Skip to content

Prevent coercion of int from empty String to null if DeserializationFeature .FAIL_ON_NULL_FOR_PRIMITIVES is true #1095

@yzmyyff

Description

@yzmyyff

I got 0 from the code below.

int i = mapper.readValue("\"\"", int.class);
System.out.println(i);

It seems that Json Number type cannot start with ".
Could I make the code throw some Exceptions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions