diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 4a0d7de92f..69e1be88dd 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -249,6 +249,9 @@ The rule reference documentation has been updated to reflect these changes. * `accessorCommentRequirement` to specify documentation requirements for getters and setters (default to `ignored`) * `methodWithOverrideCommentRequirement` to specify documentation requirements for methods annotated with `@Override` (default to `ignored`) +* The Java rule `EmptyCatchBlock` (category `errorprone`, former ruleset `java-empty`) has been changed to ignore + exceptions named `ignore` or `expected` by default. You can still override this behaviour by setting the `allowExceptionNameRegex` property. + #### Deprecated Rules * The Java rules `NcssConstructorCount`, `NcssMethodCount`, and `NcssTypeCount` (ruleset `java-codesize`) have been diff --git a/pmd-java/src/main/resources/category/java/errorprone.xml b/pmd-java/src/main/resources/category/java/errorprone.xml index 4e6c2e5083..1cc2ef6ad6 100644 --- a/pmd-java/src/main/resources/category/java/errorprone.xml +++ b/pmd-java/src/main/resources/category/java/errorprone.xml @@ -1379,7 +1379,7 @@ or reported. - + - ^(ignored|expected)$ 0 + + + + ^idontcare$ + 0 +