Affects PMD Version:
6.20.0
Rule:
LawOfDemeter.
Description:
Direct access of fields is flagged as static access. Direct access of fields should be permitted when allowed for package-private.
Code Sample demonstrating the issue:
import java.time.LocalDate; public class Person { LocalDate birthday; public static int compareByAge(Person a, Person b) { return a.birthday.compareTo(b.birthday); } }
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
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