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

15 lines
509 B
HTML

<html>
<body>
Reports calls to <code>StringBuffer</code> and <code>StringBuilder</code> constructors with <code>char</code> as the argument.
In this case, <code>char</code> is silently cast to an integer and interpreted as the initial capacity of the buffer.
<p><b>Example:</b></p>
<pre><code>
new StringBuilder('(').append("1").append(')');
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
new StringBuilder("(").append("1").append(')');
</code></pre>
<!-- tooltip end -->
</body>
</html>