gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

Add nullablity annotation to packages

Open jgsuess opened this issue 4 years ago • 0 comments

This ticket ask for a feature enhancement in the use of the API. My understanding is that almost all calls in the library are null-safe. It would be great to express that, so compilers can make use of this information.

I am using the Eclipse compiler, so for this purpose it would be enough to add @NonNullByDefault (types in method signatures and field declarations that lack a null annotation are regarded as non-null) to each Package (via a file package-info.java) - to effect everything in that package.

Note that the annotation library obviously does not need to ship, so other than some additional metadata on the class files there is no effect.

Below are the details of the use:

If it is not desirable to change metadata on the project, or there are license issues with the Eclipse dependency, the same effect can be achieved by using External Null Annotations and deploying them through Last NPE.

jgsuess avatar Oct 14 '21 22:10 jgsuess