NonRuntimeAnnotation
Calling getAnnotation on an annotation that is not retained at runtime

Severity
ERROR

The problem

Calling getAnnotation on an annotation that does not have its Retention set to RetentionPolicy.RUNTIME will always return null.

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("NonRuntimeAnnotation") to the enclosing element.