Add additional test case
This commit is contained in:
1 file changed
+13
+13
@@ -1296,6 +1296,19 @@ public class InsufficientStringBufferDeclaration {
|
||||
sb.append('d'); // length is now 9
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>False positive with method formal parameter</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class InsufficientStringBufferDeclaration {
|
||||
protected void appendHintMessage(StringBuilder msg) {
|
||||
msg.append("A very long text");
|
||||
msg.append("that is longer than 16 characters");
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
Reference in new issue
Block a user