[Improvement]: Add jetbrains annotations to the classpath dependencies for @NotNull
and @Nullable
annotations
#43386
Labels
@NotNull
and @Nullable
annotations
#43386
Description
There is already some small usage of this dependency in the
jballerina-unit-test
module (here and here) but it is only via a transitive dependency of the kotlin std lib.It would be great to add this dependency directly to the
javaProject.gradle
compileOnly
scope, so it can be used everywhere (without adding any runtime overhead or increasing the distribution size).There are other options for
@Nullable
annotations, e.g.but since the JetBrains annotations are already used I think these should be adopted.
This would help will NPEs since nullable values can be annotated and therefore better documented.
Also IntelliJ and Spotbugs use these annotations in static analysis.
Describe your problem(s)
There is currently no standard defined to document nullable values in the project.
Describe your solution(s)
Add this dependency to the
compileOnly
scope of thejavaProject.gradle
file.Related area
-> Other Area
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: