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

16 lines
665 B
HTML

<html>
<body>
Reports expressions of the <code>char</code> type used in addition or subtraction expressions.
<p>Such code is not necessarily an issue but may result in bugs (for example,
if a string is expected).</p>
<p><b>Example:</b> <code>int a = 'a' + 42;</code></p>
<p>After the quick-fix is applied: <code>int a = (int) 'a' + 42;</code></p>
<p>For the <code>String</code> context:
<pre><code>int i1 = 1;
int i2 = 2;
System.out.println(i2 + '-' + i1 + &quot; = &quot; + (i2 - i1));</code></pre>
<p>After the quick-fix is applied:</p>
<code>System.out.println(i2 + &quot;-&quot; + i1 + &quot; = &quot; + (i2 - i1));</code>
<!-- tooltip end -->
</body>
</html>