Files
openide/java/java-impl/resources/inspectionDescriptions/SuspiciousIndentAfterControlStatement.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

26 lines
734 B
HTML

<html>
<body>
Reports suspicious indentation of statements after a control statement without braces.
<p>
Such indentation can make it look like the statement is inside the control statement,
when in fact it will be executed unconditionally after the control statement.
</p>
<p><b>Example:</b></p>
<pre><code>
class Bar {
void foo(int i) {
if (i == 0)
System.out.println("foo");
System.out.println("bar"); // warning
if (i == 1);
System.out.println("great"); // warning
if (i == 42)
System.out.println("answer");
System.out.println("question"); // warning
}
}
</code></pre>
<!-- tooltip end -->
</body>
</html>