use jakarta.annotation to document nullability of APIs#726
use jakarta.annotation to document nullability of APIs#726gavinking wants to merge 1 commit intojakartaee:masterfrom
Conversation
|
Setting this to Draft mode because it's a source of conflicts with other open PRs. |
|
For my opinion, it is better to introduce a The good is using Another benefit from JSpecify is the support from IDE when coding or build tools at compile time. |
I agree that Also, doing that is an invitation to all these people who want to add their favorite rubbishy Anyway,
I'm not sure what you mean by this. JSpecify is an open source library. Jakarta Annotations can't use it. |
There is a JSR-305 for this before. Currently, Spring and its ecosystem switched to JSpecify, and IDEA also has built-in error/warning reports for JSpecify annotated fields to help developers to avoid NPE. When using these Spring Java APIs in Kotlin projects, it is type-safe like calling Kotlin types(autodetect the nullable for all fields in a Class, or method parameters) in IDEA. |
And that JSR failed. ... for what, it seems to me, after looking at the rather horrible and arbitrary set of proposed annotations, were pretty good reasons, I would say.
Jakarta Persistence is not Spring, and we can't use random libraries we download from the Internet. |
see #725