FasterXML / FasterXML/jackson-core

Explicitly indicate Nullability of arguments and return values (JSpecify) -- for 3.3?

Aperta
#1,105 13 commenti 0 reazioni 0 assegnatari Vedi su GitHub
3.x
Lingua principale
Java
Stelle
2.4k
Fork
928
Merge medio
2g 18h
PR unite (30g)
24

Descrizione

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.
https://github.com/FasterXML/jackson-dataformat-xml/issues/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`.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.