JetBrains / java-annotations

Annotations for JVM-based languages.
Apache License 2.0
404 stars 47 forks source link

Allow NotNull and Nullable on package declarations #60

Closed spnda closed 3 years ago

spnda commented 3 years ago

When @NotNull and @Nullable are used on a package declaration in a package-info.class, all fields in all classes should be not-nullable or nullable by default, respectively. Frameworks like Spring have had these annotations for a while (@NonNullFields and @NonNullApi, and would therefore not require any new implementation for many static analyzers). It might also be a bit better to make these new annotations, but that's up to you, reviewers.

amaembo commented 3 years ago

Duplicated by #18 This problem is much more complex than just adding a new target and two lines of documentation. There are many questions to address, e.g.:

I'm closing this, as we already have #18 to track the same problem.