Table of Contents

29-November-2024 - 7.8.0

The PMD team is pleased to announce PMD 7.8.0.

This is a minor release.

🚀 New and noteworthy

🌟 New and changed rules

New Rules

  • The new Apex rule QueueableWithoutFinalizer detects when the Queueable interface is used but a Finalizer is not attached. Without attaching a Finalizer, there is no way of designing error recovery actions should the Queueable action fail.

🐛 Fixed Issues

  • ant
    • #1860: [ant] Reflective access warnings on java > 9 and java < 17
  • apex
    • #5302: [apex] New Rule: Queueable Should Attach Finalizer
    • #5333: [apex] Token recognition errors for string containing unicode escape sequence
  • html
    • #5322: [html] CPD throws exception on when HTML file is missing closing tag
  • java
    • #5283: [java] AssertionError “this should be unreachable” with scala library
    • #5293: [java] Deadlock when executing PMD in multiple threads
    • #5324: [java] Issue with type inference of nested lambdas
    • #5329: [java] Type inference issue with unknown method ref in call chain
    • #5338: [java] Unresolved target type for lambdas make overload resolution fail
  • java-bestpractices
    • #4113: [java] JUnitTestsShouldIncludeAssert - false positive with SoftAssertionsExtension
    • #5083: [java] UnusedPrivateMethod false positive when method reference has no target type
    • #5097: [java] UnusedPrivateMethod FP with raw type missing from the classpath
    • #5318: [java] PreserveStackTraceRule: false-positive on Pattern Matching with instanceof
  • java-codestyle
    • #5214: [java] Wrong message for LambdaCanBeMethodReference with method of enclosing class
    • #5263: [java] UnnecessaryFullyQualifiedName: false-positive in an enum that uses its own static variables
    • #5315: [java] UnnecessaryImport false positive for on-demand imports
  • java-design
    • #4763: [java] SimplifyBooleanReturns - wrong suggested solution
  • java-errorprone
    • #5070: [java] ConfusingArgumentToVarargsMethod FP when types are unresolved
  • java-performance
    • #5287: [java] TooFewBranchesForSwitch false-positive with switch using list of case constants
    • #5314: [java] InsufficientStringBufferDeclarationRule: Lack of handling for char type parameters
    • #5320: [java] UseStringBufferLength: false-negative on StringBuffer of sb.toString().equals(“”)

🚨 API Changes

Deprecations

  • pmd-coco
    • CocoBaseListener is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • CocoBaseVisitor is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • CocoListener is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • CocoParser is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • CocoVisitor is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
  • pmd-gherkin
    • GherkinBaseListener is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • GherkinBaseVisitor is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • GherkinListener is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • GherkinParser is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • GherkinVisitor is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
  • pmd-julia
    • JuliaBaseListener is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • JuliaBaseVisitor is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • JuliaListener is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • JuliaParser is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
    • JuliaVisitor is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
  • pmd-kotlin
    • UnicodeClasses is deprecated for removal. This class was never intended to be generated. It will be removed with no replacement.
  • pmd-xml

✨ Merged pull requests

📦 Dependency updates

  • #5285: Bump pmd from 7.5.0 to 7.7.0
  • #5288: Bump asm from 9.7 to 9.7.1
  • #5290: Bump org.apache.maven.plugins:maven-assembly-plugin from 3.6.0 to 3.7.1
  • #5301: Bump gems and bundler
  • #5307: Bump org.apache.maven.plugins:maven-clean-plugin from 3.3.2 to 3.4.0
  • #5308: Bump webrick from 1.8.2 to 1.9.0 in /docs in the all-gems group across 1 directory
  • #5312: Bump maven-pmd-plugin from 3.24.0 to 3.26.0
  • #5316: Bump rouge from 4.4.0 to 4.5.0 in the all-gems group across 1 directory
  • #5317: Bump org.apache.commons:commons-compress from 1.26.0 to 1.27.1
  • #5348: Bump rouge from 4.5.0 to 4.5.1 in the all-gems group across 1 directory
  • #5350: Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.17.0
  • #5356: Bump build-tools to 28
  • #5357: Bump log4j.version from 2.23.0 to 2.24.2
  • #5358: Bump org.apache.maven.plugins:maven-dependency-plugin from 3.7.1 to 3.8.1
  • #5359: Bump org.apache.maven.plugins:maven-release-plugin from 3.0.1 to 3.1.1
  • #5360: Bump io.github.apex-dev-tools:apex-ls_2.13 from 5.2.0 to 5.5.0
  • #5361: Bump ant.version from 1.10.14 to 1.10.15
  • #5362: Bump org.jetbrains:annotations from 24.1.0 to 26.0.1
  • #5363: Bump com.puppycrawl.tools:checkstyle from 10.18.1 to 10.20.1
  • #5364: Bump info.picocli:picocli from 4.7.5 to 4.7.6
  • #5365: Bump com.github.hazendaz.maven:coveralls-maven-plugin from 4.5.0-M3 to 4.5.0-M5
  • #5366: Bump org.mockito:mockito-core from 4.11.0 to 5.14.2
  • #5367: Bump surefire.version from 3.2.5 to 3.5.2
  • #5368: Bump org.junit.platform:junit-platform-suite from 1.11.2 to 1.11.3

📈 Stats

  • 216 commits
  • 55 closed tickets & PRs
  • Days since last release: 35