25-July-2020 - 6.26.0
The PMD team is pleased to announce PMD 6.26.0.
This is a minor release.
New and noteworthy
New Rules
- The new Java rule
UnusedAssignment
(java-bestpractices
) finds assignments to variables, that are never used and are useless. The new rule is supposed to entirely replaceDataflowAnomalyAnalysis
.
Modified rules
- The Java rule
ArrayIsStoredDirectly
(java-bestpractices
) now ignores by default private methods and constructors. You can restore the old behavior by setting the new propertyallowPrivate
to “false”.
Fixed Issues
- apex
- #2610: [apex] Support top-level enums in rules
- apex-bestpractices
- #2626: [apex] UnusedLocalVariable - false positive on case insensitivity allowed in Apex
- apex-performance
- #2598: [apex] AvoidSoqlInLoops false positive for SOQL with in For-Loop
- apex-security
- #2620: [visualforce] False positive on VfUnescapeEl with new Message Channel feature
- core
- java-bestpractices
- java-codestyle
- #2546: [java] DuplicateImports reported for the same import… and import static…
- java-design
- #2174: [java] LawOfDemeter: False positive with ‘this’ pointer
- #2181: [java] LawOfDemeter: False positive with indexed array access
- #2189: [java] LawOfDemeter: False positive when casting to derived class
- #2580: [java] AvoidThrowingNullPointerException marks all NullPointerException objects as wrong, whether or not thrown
- #2625: [java] NPathComplexity can’t handle switch expressions
- java-errorprone
- java-performance
API Changes
Deprecated API
For removal
RuleChainVisitor
and all implementations in language modulesAbstractRuleChainVisitor
Language#getRuleChainVisitorClass
BaseLanguageModule#<init>
ImportWrapper
External Contributions
- #2558: [java] Fix issue #1736 and issue #2207 - Young Chan
- #2560: [java] Fix false positives of LawOfDemeter: this and cast expressions - xioayuge
- #2590: Update libraries snyk is referring to as
unsafe
- Artem Krosheninnikov - #2597: [dependencies] Fix issue #2594, update exec-maven-plugin everywhere - Artem Krosheninnikov
- #2621: [visualforce] add new safe resource for VfUnescapeEl - Peter Chittum
- #2640: [java] NullPointerException in rule ProperCloneImplementation - Mykhailo Palahuta
- #2641: [java] AvoidThrowingNullPointerException marks all NullPointerException… - Mykhailo Palahuta
- #2643: [java] AvoidCallingFinalize detects some false positives (2578) - Mykhailo Palahuta
- #2651: [java] False negative: LiteralsFirstInComparisons for methods… (2569) - Mykhailo Palahuta
- #2652: [java] UseCollectionIsEmpty can not detect the case this.foo.size() - Mykhailo Palahuta
Stats
- 156 commits
- 43 closed tickets & PRs
- Days since last release: 28