Files
pmd/docs/pages/release_notes.md
2020-06-12 13:54:40 +02:00

4.3 KiB

title, permalink, keywords
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/codestyle/UnnecessaryCast" %} (java-codestyle) finds casts that are unnecessary while accessing collection elements.

  • 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 and contentEquals in addition to equals and equalsIgnoreCase.

    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
  • core
    • #2484: [core] Update maven-enforcer-plugin to require Java 118
  • java
    • #2472: [java] JavaCharStream throws an Error on invalid escape
  • java-bestpractices
    • #2288: [java] JUnitTestsShouldIncludeAssert: Add support for Hamcrest MatcherAssert.assertThat
  • java-errorprone
    • #2477: [java] JUnitSpelling false-positive for JUnit5/4 tests
  • swift
    • #2473: [swift] Swift 5 (up to 5.2) support for CPD

API Changes

Deprecated APIs

  • {% jdoc !ca!core::lang.BaseLanguageModule#addVersion(String, LanguageVersionHandler, boolean) %}
  • Some members of {% jdoc core::lang.ast.TokenMgrError %}, in particular, a new constructor is available that should be preferred to the old ones
  • {% jdoc core::lang.antlr.AntlrTokenManager.ANTLRSyntaxError %}

Experimental APIs

Note: Experimental APIs are identified with the annotation {% jdoc core::annotation.Experimental %}, see its javadoc for details

  • The experimental methods in {% jdoc !ca!core::lang.BaseLanguageModule %} have been replaced by a definitive API.

External Contributions

{% endtocmaker %}