#2160 (comment)
Affects PMD Version:
6.20.0
Rule:
LawOfDemeter
Description:
Index of array is treated as a method chain call by this rule. Data structures must be exempt from this rule especially indexed array access.
Code Sample demonstrating the issue:
public final class Util { public static boolean check(String passwd, String hashed) { try { final String[] parts = hashed.split("\\$"); if (parts.length != 5 || !parts[1].equals("s0")) { throw new IllegalArgumentException( "Invalid hashed value"); } } } }
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