From 91579173fdc26c1f7722e810c80f15708f89cebf Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 31 Jul 2020 11:12:57 +0200 Subject: [PATCH] [java] Formatting of rule doc of AvoidReassigningCatchVariables --- .../src/main/resources/category/java/bestpractices.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pmd-java/src/main/resources/category/java/bestpractices.xml b/pmd-java/src/main/resources/category/java/bestpractices.xml index 062c79e536..4713db5cb0 100644 --- a/pmd-java/src/main/resources/category/java/bestpractices.xml +++ b/pmd-java/src/main/resources/category/java/bestpractices.xml @@ -218,8 +218,11 @@ class Foo { externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_bestpractices.html#avoidreassigningcatchvariables"> Reassigning exception variables caught in a catch statement should be avoided because of: -1) If it is needed, multi catch can be easily added and code will still compile -2) Following the principle of least surprise we want to make sure that a variable caught in a catch statement is always the one thrown in a try block + +1) If it is needed, multi catch can be easily added and code will still compile. + +2) Following the principle of least surprise we want to make sure that a variable caught in a catch statement +is always the one thrown in a try block. 3