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

16 lines
590 B
HTML

<html>
<body>
Reports bitwise mask expressions which are guaranteed to
evaluate to <code>true</code> or <code>false</code>.
<p>
The inspection checks the expressions of the form <code>(var & constant1) == constant2</code> or
<code>(var | constant1) == constant2</code>, where <code>constant1</code>
and <code>constant2</code> are incompatible bitmask constants.</p>
<p><b>Example:</b></p>
<pre><code> // Incompatible mask: as the mask ends in 00,
// the result could be 0x1200 but not 0x1234
if ((mask & 0xFF00) == 0x1234) {...}
</code></pre>
<!-- tooltip end -->
</body>
</html>