forked from phoedos/pmd
Add some tests to reproduce reported bugs
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7636 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -27,6 +27,7 @@ TODO - Release blockers - Must implement before this release can be finally fini
|
||||
and pmd-java:typeof).
|
||||
|
||||
Fixed bug 3470274: Using Label for lines in XMLRenderer
|
||||
Fixed bug 3175710: NPE in InsufficientStringBufferDeclaration
|
||||
|
||||
---
|
||||
|
||||
|
@ -80,4 +80,20 @@ public class Foo {
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code regressionTest="false">
|
||||
<description><![CDATA[
|
||||
[3394465] False positive for UselessStringValueOf
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
class TestClass {
|
||||
|
||||
public void testMethod() {
|
||||
char[] idFormat = {'0', '0', '0', '0', '0'};
|
||||
String abc = "1" + String.valueOf(idFormat);
|
||||
System.out.println(abc); // Output 100000
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
@ -135,6 +135,17 @@ Interface with array declaration
|
||||
<code><![CDATA[
|
||||
public interface Foo {
|
||||
public String[] getArr();
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code regressionTest="false">
|
||||
<description><![CDATA[
|
||||
3220206: False positive using a ternary operator
|
||||
]]></description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public byte[] getContent() {
|
||||
return this.content == null ? null : content.clone();
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
Reference in New Issue
Block a user