blob: e69e0d11d5b714e270ace0a6adba1c5c944d89df [file] [log] [blame]
<html>
<body>
<p>Reports a <b>null</b> check followed by an <b>instanceof</b> check.
Since the <b>instanceof</b> operator always returns <b>false</b> for <b>null</b>,
there is no need to also have a <b>null</b> check. </p>
<p>Here is an example of a violation: </p>
<pre><code> if (x != null && x instanceof String) { ... }</code></pre>
<p>The quickfix changes this code to:</p>
<pre><code> if (x instanceof String) { ... }</code></pre>
<!-- tooltip end -->
<p>
<small>New in 11, Powered by InspectionGadgets</small>
</body>
</html>