Add additional test case

This commit is contained in:
Andreas Dangel committed 2021-05-18 19:46:55 +02:00
1 parent 7346c4974c
commit 072f4a8124
1 file changed
+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>