A RetroSearch Logo

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

Search Query:

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

Do not flag fields annotated with @Inject · Issue #4011 · pmd/pmd · GitHub

Affects PMD Version: 6.46.0

Rule: ImmutableField

Description: Fields that are annotated using the javax.inject.Inject annotation should not be final. However, a violation suggesting as much is still triggered.

Code Sample demonstrating the issue:

public abstract class AbstractDapiProcess implements Process {
   @Inject private AuthenticationService authService;

Expected outcome: No violation

PMD reports a violation at line 2 but that's wrong. That's a false positive.

Running PMD through: CLI


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