[java] Fix AvoidCatchingGenericException for multi-catch
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -62,7 +62,7 @@ Avoid catching generic exceptions such as NullPointerException, RuntimeException
|
||||
<value>
|
||||
<![CDATA[
|
||||
//CatchParameter[
|
||||
ClassType[
|
||||
(.|UnionType)/ClassType[
|
||||
pmd-java:typeIsExactly('java.lang.NullPointerException') or
|
||||
pmd-java:typeIsExactly('java.lang.Exception') or
|
||||
pmd-java:typeIsExactly('java.lang.RuntimeException')]
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class Foo {
|
||||
|
||||
<test-code>
|
||||
<description>failure case with multi-catch</description>
|
||||
<expected-problems>2</expected-problems>
|
||||
<expected-problems>1</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
void bar() {
|
||||
|
||||
Reference in new issue
Block a user