You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fixespmd#2175
- Fixespmd#2179
- Fixespmd#1605: same fix as pmd#2179, since enum constants are static fields they are trusted.
- Fixespmd#2180: the fix is not to special-case Thread, but to consider all static methods as trusted (consistent with the treatment of static fields in pmd#2179)
- Fixespmd#2182: the fix is not to allow package-private access, but to allow a class to access fields of instances of the same class.
- Fixespmd#1014
- Fixespmd#2188
adangel
changed the title
[Java] False positive: LawOfDemeter must permit package-private access.
[java] LawOfDemeter: False positive with package-private access
Feb 25, 2022
#2160 (comment)
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:
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
The text was updated successfully, but these errors were encountered: