Remove duplicate annotations
MSALRemove annotations that are repeated on the same element, keeping only the first occurrence. Duplicates typically arise when several distinct annotations are migrated to a single new annotation, such as when both javax.annotation.Nullable and javax.annotation.CheckForNull become org.jspecify.annotations.Nullable. @Repeatable annotations are left alone, as repeating those is meaningful.
org. openrewrite. staticanalysis. RemoveDuplicateAnnotationsOptional
The type of annotation to deduplicate, as a type pattern. Defaults to any annotation.
mod run . --recipe= org. openrewrite. staticanalysis. RemoveDuplicateAnnotationsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.