[java] AvoidReassigningLoopVariables - false negatives within for-loops and skip allowed #4500
Labels
a:false-negative
PMD doesn't flag a problematic piece of code
Milestone
Affects PMD Version: 7.0.0-rc1
Rule: AvoidReassigningLoopVariables
Description:
This rule might not report anymore all reassignments of the control variable in for-loops when the property
forReassign
is set toskip
.Code Sample demonstrating the issue:
Expected outcome:
PMD should report violations at lines 13 to 22, but only lines 19 to 22 are reported.
More context:
++
,--
and+=
and-=
. Multiplication/Division shouldn't be allowed. Also not the bitwise operators (not tested:%
modulo,<<
/>>
shift,^
xor).The text was updated successfully, but these errors were encountered: