Open Silentdoer opened 11 months ago
I'd like to see the converse also added NullField and NullApi, this way you could enforce being explicit.
Honestly this is low hanging fruit, I have time on my plate and would be willing to contribute these, as well as any underlying needed duplication of JSR-305 to support them (I notice spring's annotations compose JSR-305 code)
Hey, Spring Framework committer here. I am not sure that would be as simple as adding those 2 additional annotations since:
@TypeQualifierDefault
When.MAYBE
need to be expressed in another way in order to avoid warnings from javac
In a nutshell, going beyond simple @Nonnull
and @Nullable
annotations is a huge task that is much more involved that it seems, as proven in https://github.com/jspecify/jspecify related work.
Like in Spring, non null annotations can be added to all fields in the class and method parameter return values, And it should be able to support annotation of the entire project/module