A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/248 below:

[java] UnusedModifier doesn't check static keyword on nested enum declaration · Issue #248 · pmd/pmd · GitHub

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4