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
Currently attempts to deserialize null values for TreeSet will fail with underlying NPE which usually gets wrapped as JsonMappingException (unless DeserializationFeature.WRAP_EXCEPTIONS is disabled). While acceptable this is not optimal failure indication: let's instead catch NPE and throw more meaningful exception; similar to Guava change:
Note: change needed for CollectionDeserializer (and should only catch and handle NPE for TreeSet); we don't want to assume all NPEs are due to same root cause.
NOTE: earlier comment referred to TreeMap too -- but that might not have same issue (as there's no way to get null for JSON Object keys).
cowtowncoder
changed the title
Improve handling of null insertion failure for TreeSet / TreeMap
Improve handling of null insertion failure for TreeSetDec 15, 2023
Describe your Issue
(note: tackling issue surfaced by OSS-Fuzz via https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64509)
Currently attempts to deserialize
null
values forTreeSet
will fail with underlying NPE which usually gets wrapped asJsonMappingException
(unlessDeserializationFeature.WRAP_EXCEPTIONS
is disabled). While acceptable this is not optimal failure indication: let's instead catch NPE and throw more meaningful exception; similar to Guava change:FasterXML/jackson-datatypes-collections#132
The text was updated successfully, but these errors were encountered: