[java] Formatting of rule doc of AvoidReassigningCatchVariables

This commit is contained in:
Andreas Dangel
2020-07-31 11:12:57 +02:00
parent 9b6dcfef3a
commit 91579173fd

View File

@ -218,8 +218,11 @@ class Foo {
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_bestpractices.html#avoidreassigningcatchvariables">
<description>
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.
</description>
<priority>3</priority>
<example><![CDATA[