Affects PMD Version:
7.11
Rule:
Please provide the rule name and a link to the rule documentation:
CodeStyle.CommentDefaultAccessModifier
https://docs.pmd-code.org/latest/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier
https://pmd.github.io/pmd/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier
Description:
The /* package */
comment isn't accepted in the expected location.
Code Sample demonstrating the issue:
public class Test { @SuppressWarnings("") /* package */ Test() { // <-- Missing commented default access modifier on constructor 'Test()' // nothing } }
public class Test { /* package */ @SuppressWarnings("") Test() { // <-- works, no violation // nothing } }
public class Test { @SuppressWarnings("") Test /* package */() { // <-- works, no violation // nothing } }
Expected outcome:
PMD reports a violation at line 4, but that's wrong. That's a false positive.
Running PMD through: Eclipse Plugin, 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