Files
openide/java/java-impl/resources/inspectionDescriptions/VariableNotUsedInsideIf.html
2025-02-05 04:43:28 +00:00

22 lines
580 B
HTML

<html>
<body>
Reports references to variables that are checked for nullability
in the condition of an <code>if</code> statement or
conditional expression but not used inside that
<code>if</code> statement.
<p>
Usually this either means that
the check is unnecessary or that the variable is not referenced inside the
<code>if</code> statement by mistake.
</p>
<p><b>Example:</b></p>
<pre><code>
void test(Integer i) {
if (i != null) { // here 'i' is not used inside 'if' statement
System.out.println();
}
}
</code></pre>
<!-- tooltip end -->
</body>
</html>