Edit me

31-July-2021 - 6.37.0-SNAPSHOT

The PMD team is pleased to announce PMD 6.37.0-SNAPSHOT.

This is a minor release.

New and noteworthy

New rules

This release ships with 2 new Java rules.

    <rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion" />

The rule is part of the quickstart.xml ruleset.

    <rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull" />

The rule is part of the quickstart.xml ruleset.

Renamed rules

  • The Java rule MissingBreakInSwitch has been renamed to ImplicitSwitchFallThrough (category error prone) to better reflect the rule’s purpose: The rule finds implicit fall-through cases in switch statements, which are most likely unexpected. The old rule name described only one way how to avoid a fall-through, namely using break but continue, throw and return avoid a fall-through as well. This enables us to improve this rule in the future.

Deprecated rules

The following Java rules are deprecated and removed from the quickstart ruleset, as the new rule SimplifiableTestAssertion merges their functionality:

The rule ReturnEmptyArrayRatherThanNull is deprecated and removed from the quickstart ruleset, as the new rule ReturnEmptyCollectionRatherThanNull supersedes it.

Fixed Issues

  • apex
    • #3201: [apex] ApexCRUDViolation doesn’t report Database class DMLs, inline no-arg object instantiations and inline list initialization
    • #3329: [apex] ApexCRUDViolation doesn’t report SOQL for loops
  • core
    • #3377: [core] NPE when specifying report file in current directory in PMD CLI
    • #3387: [core] CPD should avoid unnecessary copies when running with –skip-lexical-errors
  • java-bestpractices
    • #2908: [java] Merge Junit assertion simplification rules
  • java-errorprone
    • #3361: [java] Rename rule MissingBreakInSwitch to ImplicitSwitchFallThrough
    • #3382: [java] New rule ReturnEmptyCollectionRatherThanNull

API Changes

External Contributions