This commit is contained in:
Bas Leijdekkers
2013-03-29 15:17:06 +01:00
parent 503b825e03
commit 8512e6403b
@@ -2,7 +2,7 @@
<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>
there is no need to have an additional <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>