2.5 KiB
title | permalink | keywords |
---|---|---|
PMD Release Notes | pmd_release_notes.html | changelog, release notes |
{{ site.pmd.date }} - {{ site.pmd.version }}
The PMD team is pleased to announce PMD {{ site.pmd.version }}.
This is a {{ site.pmd.release_type }} release.
{% tocmaker is_release_notes_processor %}
New and noteworthy
CPD now supports XML as well
Thanks to Fernando Cosso CPD can now find duplicates in XML files as well. This is useful to find duplicated sections in XML files.
New Rules
-
The new Java Rule {% rule "java/bestpractices/LiteralsFirstInComparisons" %} (
java-bestpractices
) find String literals, that are used in comparisons and are not positioned first. Using the String literal as the receiver of e.g.equals
helps to avoid NullPointerExceptions.This rule is replacing the two old rules {% rule "java/bestpractices/PositionLiteralsFirstInComparisons" %} and {% rule "java/bestpractices/PositionLiteralsFirstInCaseInsensitiveComparisons" %} and extends the check for the methods
compareTo
,compareToIgnoreCase
andcontentEquals
in addition toequals
andequalsIgnoreCase
.Note: This rule also replaces the two mentioned rules in Java's quickstart ruleset.
Fixed Issues
- apex-bestpractices
- #2468: [apex] Unused Local Variable fails on blocks
API Changes
External Contributions
- #2446: [core] Update maven-compiler-plugin to 3.8.1 - Artem Krosheninnikov
- #2448: [java] Operator Wrap check - Harsh Kukreja
- #2449: [plsql] Additional info in SqlStatement, FormalParameter and FetchStatement - Grzegorz Sudolski
- #2452: [doc] Fix "Making Rulesets" doc sample code indentation - Artur Dryomov
- #2457: [xml] Adding XML to CPD supported languages - Fernando Cosso
- #2469: [apex] fix false positive unused variable if only a method is called - Gwilym Kuiper
- #2478: [java] New rule: LiteralsFirstInComparisons - John-Teng
{% endtocmaker %}