Currently nullability is not explicitly stated for Jackson.
On the other hand, there are actually APIs that do not allow null input.
Also, there are cases where inadvertent destructive changes can occur, as in the issue submitted below.
FasterXML/jackson-dataformat-xml#607
Personally, I think that Nullability annotations should be given to public interfaces to avoid such problems.
Jackson is a huge project and we cannot fix everything at once, but I think we can proceed gradually.
There are several possible annotations to use, but to minimize the impact, it is better to choose one whose RetentionPolicy is not RUNTIME.
Currently
nullabilityis not explicitly stated forJackson.On the other hand, there are actually APIs that do not allow
nullinput.Also, there are cases where inadvertent destructive changes can occur, as in the issue submitted below.
FasterXML/jackson-dataformat-xml#607
Personally, I think that Nullability annotations should be given to public interfaces to avoid such problems.
Jacksonis a huge project and we cannot fix everything at once, but I think we can proceed gradually.There are several possible annotations to use, but to minimize the impact, it is better to choose one whose
RetentionPolicyis notRUNTIME.