mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
16 lines
665 B
HTML
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 + " = " + (i2 - i1));</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<code>System.out.println(i2 + "-" + i1 + " = " + (i2 - i1));</code>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |