Adding testcase to reproduce bug 2027626 : 'False + : AvoidFinalLocalVariable'

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6823 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Romain Pelisse 2009-02-08 21:56:58 +00:00
parent 13f6224635
commit 9e0de88bc2

View File

@ -32,6 +32,22 @@ public final class MyClass {
public final void foo() {
String finalLocalVariable;
}
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
Bug 2027626, False + : AvoidFinalLocalVariable
]]></description>
<expected-problems>1</expected-problems>
<code>
<![CDATA[
public class A {
public String myMethod(final String str) {
final String foo = "foo";
final String bar = str.toLowerCase(Locale.getDefault());
final StringBuilder thing = new StringBuilder(128);
}
}
]]></code>
</test-code>