A RetroSearch Logo

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

Search Query:

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

[java] RedundantFieldInitializer report for annotation field not explicitly marked as final · Issue #215 · pmd/pmd · GitHub

Rule Set: optimizations.html#RedundantFieldInitializer

Description: PMD incorrectly reports a redundant field initializer for final fields in an interface.

Code Sample demonstrating the issue:

@IntDef({MetricType.CHECKBOX, MetricType.COUNTER, MetricType.SPINNER, MetricType.NOTE})
@Retention(RetentionPolicy.SOURCE)
public @interface MetricType {
    int CHECKBOX = 0; // <<<<<<<< incorrectly reported as a redundant field initializer
    int COUNTER = 1;
    int SPINNER = 2;
    int NOTE = 3;
}

Running PMD through: Gradle


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