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

23 lines
746 B
HTML

<html>
<body>
Reports assignment operations which can be replaced by operator-assignment.
<p>Code using operator assignment is shorter and may be clearer.</p>
<p><b>Example:</b></p>
<pre><code> x = x + 3;
x = x / 3;
</code></pre>
<p>After the quick fix is applied:</p>
<pre><code> x += 3;
x /= 3;
</code></pre>
<!-- tooltip end -->
<p>
Use the <b>Ignore conditional operators</b> option to ignore <code>&amp;&amp;</code>
and <code>||</code>. Replacing conditional operators with operator
assignment would change the evaluation from lazy to eager, which may change the semantics of the expression.
</p>
<p>
Use the <b>Ignore obscure operators</b> option to ignore <code>^</code> and <code>%</code>, which are less known.
</p>
</body>
</html>