[java] UnusedLocalVariable: false-positive with multiple for-loop indices #4518
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version: 6.x
Rule: UnusedLocalVariable
Description:
Index variables of for loops should be ignored by this rule. This works if a single index is used, but for multiple variables, a false positive violation is reported.
Note: This is already fixed with PMD 7.0.0-rc1.
Found via #3123.
Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation at line 12, but that's wrong. That's a false positive.
The text was updated successfully, but these errors were encountered: