By definition, primitive types are not Objects and so they cannot be null. Adding @CheckForNull or @Nullable
on primitive types is redundant and may lead to misunderstandings.
This rule raises an issue when @CheckForNull or @Nullable is set on a method returning a primitive type: byte, short,
int, long, float, double, boolean, char.
Noncompliant code example
@CheckForNull
boolean isFoo() {
...
}
Compliant solution
boolean isFoo() {
...
}