A RetroSearch Logo

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

Search Query:

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

[java] UncommentedEmptyConstructor FP when constructor annotated with @Autowired · Issue #4141 · pmd/pmd · GitHub

Affects PMD Version:6.50.0

Rule:UncommentedEmptyConstructor

https://pmd.github.io/latest/pmd_rules_java_documentation.html#uncommentedemptyconstructor

Description:

Hi, I think PMD should not report a warning at line 5 when the constructor is annotated with @Autowired, this rule should consider annotation @Autowired. Besides, I find a previous issue is related to this problem, and it has been fixed. Thanks.

Code Sample demonstrating the issue:

import org.springframework.beans.factory.annotation.Autowired;

public class Bug {
    @Autowired
    public Bug() {
    }
}

Expected outcome:

PMD reports a violation at line 5, 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