forked from phoedos/pmd
[java] Update rule DoNotThrowExceptionInFinally
This commit is contained in:
@@ -207,7 +207,7 @@
|
||||
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
|
||||
<!-- <rule ref="category/java/errorprone.xml/DoNotExtendJavaLangThrowable"/> -->
|
||||
<!-- <rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard"/> -->
|
||||
<!-- <rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally"/> -->
|
||||
<rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally"/>
|
||||
<rule ref="category/java/errorprone.xml/DontImportSun"/>
|
||||
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
|
||||
<rule ref="category/java/errorprone.xml/EmptyCatchBlock"/>
|
||||
|
@@ -1362,7 +1362,7 @@ Note: This is a PMD implementation of the Lint4j rule "A throw in a finally bloc
|
||||
<priority>4</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>//FinallyStatement[descendant::ThrowStatement]</value>
|
||||
<value>//FinallyClause[descendant::ThrowStatement]</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
|
@@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.java.rule.errorprone;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
@org.junit.Ignore("Rule has not been updated yet")
|
||||
public class DoNotThrowExceptionInFinallyTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<test-code>
|
||||
<description>classic failure case</description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<expected-linenumbers>8</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
public void bar() {
|
||||
|
Reference in New Issue
Block a user