* Downloads:
https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.34.0
<https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.34.0>
* Documentation: https://pmd.github.io/pmd-6.34.0/
<https://pmd.github.io/pmd-6.34.0/>
24-April-2021 - 6.34.0
The PMD team is pleased to announce PMD 6.34.0.
This is a minor release.
Table Of Contents
* New and noteworthy
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#new-and-noteworthy>
o New rules
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#new-rules>
o Modified rules
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#modified-rules>
o Deprecated rules
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#deprecated-rules>
* Fixed Issues
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#fixed-issues>
* API Changes
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#api-changes>
* External Contributions
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#external-contributions>
* Stats
<https://sourceforge.net/p/pmd/news/2021/04/pmd-6340-24-april-2021-released/#stats>
New and noteworthy
New rules
*
The new Java rule |UseStandardCharsets|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_bestpractices.html#usestandardcharsets>
finds usages of |Charset.forName|,
where |StandardCharsets| can be used instead.
This rule is also part of the Quickstart Ruleset
(|rulesets/java/quickstart.xml|) for Java.
*
The new Java rule |UnnecessaryImport|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport>
replaces the rules
|UnusedImports|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_bestpractices.html#unusedimports>,
|DuplicateImports|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#duplicateimports>,
|ImportFromSamePackage|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_errorprone.html#importfromsamepackage>,
and |DontImportJavaLang|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#dontimportjavalang>.
This rule is also part of the Quickstart Ruleset
(|rulesets/java/quickstart.xml|) for Java.
Modified rules
* The Apex rule |ApexCRUDViolation|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_apex_security.html#apexcrudviolation>
does not ignore getters anymore and also flags
SOQL/SOSL/DML operations without access permission checks in
getters. This will produce false positives now for
VF getter methods, but we can't reliably detect, whether a getter is
a VF getter or not. In such cases,
the violation should be suppressed
<https://sourceforge.net/p/pmd/news/2021/04/pmd_userdocs_suppressing_warnings.html>.
Deprecated rules
*
java-bestpractices
o |UnusedImports|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_bestpractices.html#unusedimports>:
use the rule |UnnecessaryImport|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport>
instead
*
java-codestyle
o |DuplicateImports|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#duplicateimports>:
use the rule |UnnecessaryImport|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport>
instead
o |DontImportJavaLang|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#dontimportjavalang>:
use the rule |UnnecessaryImport|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport>
instead
*
java-errorprone
o |ImportFromSamePackage|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_errorprone.html#importfromsamepackage>:
use the rule |UnnecessaryImport|
<https://pmd.github.io/pmd-6.34.0/pmd_rules_java_codestyle.html#unnecessaryimport>
instead
Fixed Issues
* apex-performance
o #3198 <https://github.com/pmd/pmd/pull/3198>: [apex]
OperationWithLimitsInLoopRule: Support more limit consuming
static method invocations
* apex-security
o #3202 <https://github.com/pmd/pmd/issues/3202>: [apex]
ApexCRUDViolationRule fails to report CRUD violation on COUNT()
queries
o #3210 <https://github.com/pmd/pmd/issues/3210>: [apex]
ApexCRUDViolationRule false-negative on non-VF getter
* java-bestpractices
o #3190 <https://github.com/pmd/pmd/issues/3190>: [java] Use
StandardCharsets instead of Charset.forName
o #3224 <https://github.com/pmd/pmd/issues/3224>: [java]
UnusedAssignment crashes with nested records
* java-codestyle
o #3128 <https://github.com/pmd/pmd/issues/3128>: [java] New rule
UnnecessaryImport, deprecate DuplicateImports,
ImportFromSamePackage, UnusedImports
* java-errorprone
o #2757 <https://github.com/pmd/pmd/issues/2757>: [java]
CloseResource: support Lombok's @Cleanup annotation
o #3169 <https://github.com/pmd/pmd/issues/3169>: [java]
CheckSkipResult: NPE when using pattern bindings
API Changes
No changes.
External Contributions
* #3193 <https://github.com/pmd/pmd/pull/3193>: [java] New rule:
UseStandardCharsets - Andrea Aime <https://github.com/aaime>
* #3198 <https://github.com/pmd/pmd/pull/3198>: [apex]
OperationWithLimitsInLoopRule: Support more limit consuming static
method invocations - Jonathan Wiesel <https://github.com/jonathanwiesel>
* #3211 <https://github.com/pmd/pmd/pull/3211>: [apex]
ApexCRUDViolationRule: Do not assume method is VF getter to avoid
CRUD checks - Jonathan Wiesel <https://github.com/jonathanwiesel>
* #3234 <https://github.com/pmd/pmd/pull/3234>: [apex]
ApexCRUDViolation: COUNT is indeed CRUD checkable since it exposes
data (false-negative) - Jonathan Wiesel
<https://github.com/jonathanwiesel>
Stats
* 74 commits
* 18 closed tickets & PRs
* Days since last release: 27
|