Merge branch 'pr/3652' into 7.0.x

This commit is contained in:
Clément Fournier committed 2021-12-31 15:20:54 +01:00
commit 895faa1fe5
4 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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() {