Affects PMD Version:
6.16.0
Rule:
DataClassRule, rules based on custom metrics
Description:
The rule does not count annotated methods.
The problem source is in
if (decl.jjtGetNumChildren() > 0 && tClass.isInstance(decl.jjtGetChild(0))) {where only the first child of the declaration block is considered which in case of annotated methods/fields is the annotation and not the method or field itself.
Code Sample demonstrating the issue:
@Override
public getName() {
...
}
Running PMD through: CLI
mskrajnowski, oowekyala and AnthonyKot
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