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
When deserializing an object into a map of a NonNull value Type, e.g. Map<String, String> there should be no null values in the map. But no exception is thrown when deserializing an object which contains null values into such a map, which then contains null values and cause NPEs.
Expected behavior
When the value type of a map declares to be non nullable there should be no null values at runtime, otherwise it breaks kotlin's Null Safety. Instead an error should be reported when there is a null value.
Basically, this can only be prevented by enabling the StrictNullChecks option (note that enabling this option currently has a significant performance penalty).
Also, for readValue<Map<String, String>>, no null checks are performed even if the StrictNullChecks option is enabled, because of the problem in and #399.
Describe the bug
When deserializing an object into a map of a NonNull value Type, e.g.
Map<String, String>
there should be no null values in the map. But no exception is thrown when deserializing an object which contains null values into such a map, which then contains null values and cause NPEs.To Reproduce
Following test demonstrates the bug:
Expected behavior
When the value type of a map declares to be non nullable there should be no null values at runtime, otherwise it breaks kotlin's Null Safety. Instead an error should be reported when there is a null value.
Versions
Kotlin: 1.3.72
Jackson-module-kotlin: 2.11.3
Jackson-databind: 2.11.3
The text was updated successfully, but these errors were encountered: