mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
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> |