Affects PMD Version: 6.44.0
Rule: ArrayIsStoredDirectly
https://pmd.github.io/latest/pmd_rules_java_bestpractices.html#arrayisstoreddirectly
Description:
PMD alert twice at line 5 in the following example. I think a single warning at line 7 is better since it's where the store operation takes place.
Code Sample demonstrating the issue:
public class ExampleAISD { public String[] strs; public void func(String[] strs, boolean flag) { // line 5 if (flag) { this.strs = strs; // line 7 } } }
Expected outcome:
PMD reports twice at line 5, but that's wrong.
Running PMD through: [CLI]
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