This annotation is itself annotated with @RequiredModifiers and can only be used when the specified modifiers are present. You are attempting to use it on an element that is missing one or more required modifiers.
Suppress false positives by adding the suppression annotation @SuppressWarnings("RequiredModifiers")
to the enclosing element.