verify #1340 UseStringBufferForStringAppends False Positive with ternary operator

This commit is contained in:
Andreas Dangel
2015-05-01 18:41:21 +02:00
parent e2a7356ccb
commit 3d73198ba9

View File

@ -134,4 +134,17 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description>#1340 UseStringBufferForStringAppends False Positive with ternary operator</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class UseStringBuffer {
public void foo() {
String country = (country == null || "".equals(country))
? ((String) getCountry())
: country;
}
}
]]></code>
</test-code>
</test-data>