Merge branch 'pr-2682'

[java] New Rule: AvoidReassigningCatchVariables #2682
This commit is contained in:
Andreas Dangel
2020-07-31 11:00:18 +02:00
6 changed files with 157 additions and 0 deletions

View File

@@ -14,12 +14,19 @@ This is a {{ site.pmd.release_type }} release.
### New and noteworthy
#### New Rules
* The new Java rule {% rule "java/bestpractices/AvoidReassigningCatchVariables" %} (`java-bestpractices`) finds
cases where the variable of the caught exception is reassigned. This practice is surprising and prevents
further evolution of the code like multi-catch.
### Fixed Issues
* core
* [#724](https://github.com/pmd/pmd/issues/724): \[core] Avoid parsing rulesets multiple times
* [#2653](https://github.com/pmd/pmd/issues/2653): \[lang-test] Upgrade kotlintest to Kotest
* java-bestpractices
* [#2471](https://github.com/pmd/pmd/issues/2471): \[java] New Rule: AvoidReassigningCatchVariables
* [#2668](https://github.com/pmd/pmd/issues/2668): \[java] UnusedAssignment false positives
* java-errorprone
* [#2431](https://github.com/pmd/pmd/issues/2431): \[java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message
@@ -46,6 +53,7 @@ This is a {{ site.pmd.release_type }} release.
* [#2677](https://github.com/pmd/pmd/pull/2677): \[java] RedundantFieldInitializer can not detect a special case for char initialize: `char foo = '\0';` - [Mykhailo Palahuta](https://github.com/Drofff)
* [#2678](https://github.com/pmd/pmd/pull/2678): \[java] AvoidCatchingThrowable can not detect the case: catch (java.lang.Throwable t) - [Mykhailo Palahuta](https://github.com/Drofff)
* [#2679](https://github.com/pmd/pmd/pull/2679): \[java] InvalidLogMessageFormatRule throws IndexOutOfBoundsException when only logging exception message - [Mykhailo Palahuta](https://github.com/Drofff)
* [#2682](https://github.com/pmd/pmd/pull/2682): \[java] New Rule: AvoidReassigningCatchVariables - [Mykhailo Palahuta](https://github.com/Drofff)
{% endtocmaker %}