== Why is this an issue? Before Java 8, a container annotation was required as wrapper to use multiple instances of the same annotation. As of Java 8, this is no longer necessary. Instead, these annotations should be used directly without a wrapper, resulting in cleaner and more readable code. This rule is automatically disabled when the project's `sonar.java.source` is lower than `8` as repeating annotations were introduced in Java 8. === Code examples ==== Noncompliant code example [source,java,diff-id=1,diff-type=noncompliant] ---- @SomeAnnotations({ // Noncompliant, wrapper annotations are not necessary in Java 8+ @SomeAnnotation(..a..), @SomeAnnotation(..b..), @SomeAnnotation(..c..), }) public class SomeClass { ... } ---- ==== Compliant solution [source,java,diff-id=1,diff-type=compliant] ---- @SomeAnnotation(..a..) @SomeAnnotation(..b..) @SomeAnnotation(..c..) public class SomeClass { ... } ---- == References * https://docs.oracle.com/javase/tutorial/java/annotations/repeating.html[Repeating Annotations - The Java™ Tutorials] ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) === Message Remove the XXX wrapper from this annotation group. [(sonar.java.source not set. Assuming 8 or greater.)] endif::env-github,rspecator-view[]