Open abeln opened 6 years ago
I don't know how well CheckerFramework performs in nullness annotation inference, they do have the feature:
https://checkerframework.org/manual/#nullness-inference
It would be cool if it can generate a useful set of @NonNull annotations for JDK.
@liufengyun writes
Currently, there are 3 well-known NonNull annotations in the Java world:
A quick github search suggests that Android @NonNull seems to be widely adopted among Android developers.
Kotlin currently supports all known annotations (source):
If the Java source code has no @NonNull annotations, e.g. JDK, can we do better?
Yes. CheckerFramework recently published standard format about external annotation database (.jaif), on August 30th, 2018:
A natural step is to (1) use CheckerFramework inference tools automatically generate annotation databases for Java libraries; (2) grow the databases via crowdsourcing (a more friendly DB interface required). This can be useful for JDK and widely used libraries like Guava, as the APIs are very stable.