pmd: fixed #878 False positive: UnusedFormalParameter for abstract methods

This commit is contained in:
Andreas Dangel 2013-01-23 21:24:36 +01:00
parent 7ee96a6b52
commit cb9861dd1f
3 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
???? ??, 2012 - 5.0.2:
Fixed bug 878: False positive: UnusedFormalParameter for abstract methods
Fixed bug 1012: False positive: Useless parentheses.
Fixed bug 1026: PMD doesn't handle 'value =' in SuppressWarnings annotation
Fixed bug 1037: Facing a showstopper issue in PMD Report Class (report listeners)

View File

@ -33,7 +33,7 @@ public class UnusedFormalParameterRule extends AbstractJavaRule {
if (!node.isPrivate() && !getProperty(CHECKALL_DESCRIPTOR)) {
return data;
}
if (!node.isNative()) {
if (!node.isNative() && !node.isAbstract()) {
check(node, data);
}
return data;

View File

@ -234,4 +234,14 @@ class Foo {
]]>
</code>
</test-code>
<test-code>
<description>#878 don't flag abstract methods even if checkall property is set when checking an abstract class</description>
<rule-property name="checkAll">true</rule-property>
<expected-problems>0</expected-problems>
<code><![CDATA[
abstract class Foo {
protected abstract void foo(Long s);
}
]]></code>
</test-code>
</test-data>