If a while
or for
statement uses a loop counter, and increments or decrements the counter by more than one, it must use an inequality operator (that is, <
, <=
, >
, or >=
) to terminate the loop. This prevents the loop from executing indefinitely or until the counter wraps around and reaches the final value. (See rule NUM00 NUM16-J. Detect or prevent integer overflow.)
Noncompliant Code Example
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="63a0281123cbfa89-795493b8-41db45d7-a14dbdfe-82015997485f81d6c48e0b55"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | 15.20.1 Numerical Comparison Operators <, <=, >, and >= | ]]></ac:plain-text-body></ac:structured-macro> |
...