Calling getAnnotation on an annotation that does not have its Retention set to RetentionPolicy.RUNTIME will always return null.
Suppress false positives by adding the suppression annotation @SuppressWarnings("NonRuntimeAnnotation")
to the enclosing element.