Synopsis: | Don't modify control variables within a for block |
Language: | Java |
Severity Level: | 2 |
Category: | Basic |
Description: |
Reassigning loop variables can lead to hard-to-find bugs. Prevent or limit how these variables can be changed.
for (int i = 0; i < 1; i++) { i++; //violation } |