diff --git a/pmd-java/src/main/resources/rulesets/java/unusedcode.xml b/pmd-java/src/main/resources/rulesets/java/unusedcode.xml index 21918922c7..54f0736693 100644 --- a/pmd-java/src/main/resources/rulesets/java/unusedcode.xml +++ b/pmd-java/src/main/resources/rulesets/java/unusedcode.xml @@ -103,13 +103,21 @@ public class Foo { class="net.sourceforge.pmd.lang.java.rule.unusedcode.UnusedModifierRule" externalInfoUrl="${pmd.website.baseurl}/rules/java/unusedcode.html#UnusedModifier"> -Fields in interfaces are automatically public static final, and methods are public abstract. -Classes or interfaces nested in an interface are automatically public and static (all nested interfaces are automatically static). +Fields in interfaces and annotations are automatically `public static final`, and methods are `public abstract`. +Classes, interfaces or annotations nested in an interface or annotation are automatically `public static` +(all nested interfaces and annotations are automatically static). +Nested enums are automatically `static`. For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous. 3