nullability-annotations-inspection

Compatible with IntelliJ IDEA
Sep 12, 2017
194
nullability-annotations-inspections

Reports fields, parameters and return values of methods which do not have a nullability annotation, like @NotNull or @Nullable.[1]


Quick fixes are presented to add one of the annotations to the elements with a problem.


When your project uses 'default' annotations like @ParamsAreNonnulByDefault[1] by means of JSR305' javax.annotation.meta.TypeQualifierDefault, a quick fix will be presented to apply the annotation to the current package by adding the annotation to the package-info.java. If a package-info.java doesn't exist yet it will be created automatically.


Only annotations registered with IntelliJ will be suggested in the quick fixes. Go to Preferences | Build | Compiler | Configure annotations ... to register your own.



[1]: Any nullability annotation can be used, like JSR-305, JetBrains' or your own as long as you configure them in IDEA.

Download plugin

Recent change notes

Changes in 0.0.9 (2017-09-12)

  • [#8] Distinguish between static and non-static final fields