Closed
Description
Rule Set: unused/UnusedModifier
Description:
Enums are static
by default. Explicitly setting them matches this rule's criteria:
For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous.
Code Sample demonstrating the issue:
public @interface Test {
public static enum EnumSample {
TEST;
}
}
PMD will find no violations on this annotation, 1 violation is expected.
The behavior is consistent when nested in classes, annotations and interfaces.
Running PMD through: Any