mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
19 lines
556 B
HTML
19 lines
556 B
HTML
<html>
|
|
<body>
|
|
Reports any instance of <code>for</code>,
|
|
<code>while</code>, and <code>do</code> statements whose
|
|
bodies will be executed once at most. Normally, this is an indication of a bug.
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Use the <b>Ignore enhanced for loops</b> option to ignore the foreach loops.
|
|
They are sometimes used to perform an action only on the first item of an iterable in a compact way.
|
|
</p>
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
<b>for</b> (String s : stringIterable) {
|
|
doSomethingOnFirstString(s);
|
|
<b>break</b>;
|
|
}
|
|
</code></pre>
|
|
</body>
|
|
</html> |