29-January-2022 - 6.42.0
The PMD team is pleased to announce PMD 6.42.0.
This is a minor release.
New and noteworthy
Javascript: Rhino updated to latest version 1.7.14
Rhino, the implementation of JavaScript we use for parsing JavaScript code, has been updated to the latest version 1.7.14. Now language features like template strings can be parsed. However Rhino does not support all features of the latest EcmaScript standard.
New rules
- The new Java rule
FinalParameterInAbstractMethod
detects parameters that are declared as final in interfaces or abstract methods. Declaring the parameters as final is useless because the implementation may choose to not respect it.
<rule ref="category/java/codestyle.xml/FinalParameterInAbstractMethod" />
The rule is part of the quickstart.xml ruleset.
Modified rules
- The Apex rule
ApexDoc
has a new propertyreportProperty
. If set tofalse
(default istrue
if unspecified) doesn’t report missing ApexDoc comments on properties. It allows you to enforce ApexDoc comments for classes and methods without requiring them for properties.
Fixed Issues
- core
- #3328: [core] designer.bat errors when JAVAFX_HOME contains spaces
- java
- #3698: [java] Error resolving Symbol Table
- java-bestpractices
- java-design
- #3679: [java] Make FinalFieldCouldBeStatic detect constant variable
- java-errorprone
- #3644: [java] InvalidLogMessageFormat: false positives with logstash structured logging
- #3686: [java] ReturnEmptyCollectionRatherThanNull - false negative with conditioned returns
- #3701: [java] MissingStaticMethodInNonInstantiatableClass false positive with method inner classes
- #3721: [java] ReturnEmptyCollectionRatherThanNull - false positive with stream and lambda
- java-performance
- javascript
- #3703: [javascript] Error - no Node adapter class registered for XmlPropRef
API Changes
No changes.
External Contributions
- #3631: [java] Fixed False positive for UselessStringValueOf when there is no initial String to append to - John Armgardt
- #3683: [java] Fixed 3468 UnusedPrivateMethod false positive when outer class calls private static method on inner class - John Armgardt
- #3688: [java] Bump log4j to 2.16.0 - Sergey Nuyanzin
- #3693: [apex] ApexDoc: Add reportProperty property - Steve Babula
- #3704: [java] Fix for #3686 - Fix ReturnEmptyCollectionRatherThanNull - Oleksii Dykov
- #3713: [java] Enhance UnnecessaryModifier to support records - Vincent Galloy
- #3719: [java] Upgrade log4j to 2.17.1 - Daniel Paul Searles
- #3720: [java] New rule: FinalParameterInAbstractMethod - Vincent Galloy
- #3724: [java] Fix for #3679 - fix FinalFieldCouldBeStatic - Oleksii Dykov
- #3727: [java] #3724 - fix FinalFieldCouldBeStatic: triggers only if the referenced name is static - Oleksii Dykov
- #3742: [java] Fix #3701 - fix MissingStaticMethodInNonInstantiatableClass for method local classes - Oleksii Dykov
- #3744: [core] Updated SaxonXPathRuleQueryTest.java - Vyom Yadav
- #3745: [java] Fix #3712: InsufficientStringBufferDeclaration setLength false positive - Daniel Gredler
- #3747: [visualforce] Updated DataType.java - Vyom Yadav
Stats
- 88 commits
- 35 closed tickets & PRs
- Days since last release: 62