Table of Contents

30-October-2026 - 7.29.0-SNAPSHOT

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

This is a minor release.

🚀️ New and noteworthy

🌟️ New and Changed Rules

Changed Rules

  • The Java rule FinalFieldCouldBeStatic no longer reports casts or conditional expressions whose constant classification previously depended on a boxed static final field. Direct static field references are still reported.
  • The Java rule UnconditionalIfStatement now excludes final local boolean constants, consistently with its existing exclusion of named compile-time constants used for conditional compilation.
  • The Java rule UnusedNullCheckInEquals now recognizes final local String constants and unqualified instance String constants as non-null receivers, avoiding unnecessary reports.
  • The Java rule AvoidReassigningLoopVariables, with forReassign=skip, now accepts a final local constant equal to one as the increment of a conditional skip.
  • The Java rule UnusedAssignment now recognizes final local boolean constants when analyzing short-circuit conditions, avoiding false positives caused by assignments that cannot execute.
  • The Java rule LiteralsFirstInComparisons now recognizes final local String constants and unqualified references to non-static final String constants. This may add violations when such a constant is the argument of a comparison, or remove them when it is already the receiver.
  • The Java rule UseExplicitTypes has a new property allowLongTypeNames. It allows to use var when the explicit type name would be longer than a given minimum length configured with this property.

🐛️ Fixed Issues

  • core
    • #6912: [core] Include XML validation details in ruleset loading errors
    • #7156: [core] Analysis cache fails with ZipException on invalid archive on the auxclasspath
  • groovy
    • #7110: [groovy] Fix #7100: CPD fails on GStrings ending in an interpolated variable
  • html
    • #5313: [html] CPD gets end line wrong for HTML
  • java
    • #7060: [java] getConstValue() returns null for constant expressions referencing final local variables
    • #7133: [java] CPD: Constructor detection state leaks between files with –ignore-identifiers
    • #7145: [java] Lambda with a parenthesized expression body is treated as void-compatible
  • java-bestpractices
    • #5159: [java] UnusedAssignment false positive when using assert
    • #7063: [java] ResultSet.next() ? x : y fires CheckResultSet
  • java-codestyle
    • #6903: [java] Enhance UseExplicitTypes to allow verbose long explicit types
  • java-design
    • #4815: [java] ExceptionAsFlowControl false-positive on Lambda/asynchronous (7.0.0-rc4)
    • #7117: [java] ExceptionAsFlowControl: false negative when the lambda is invoked by the method it is passed to

🚨️ API Changes

  • Java constant folding now recognizes final primitive and String variables initialized with constant expressions, including local variables and unqualified instance fields. Numeric references are converted to their declared type. Boxed fields and field accesses qualified by expressions (such as this.CONSTANT) are not compile-time constants. These changes affect ASTExpression.getConstValue(), isCompileTimeConstant(), and the XPath attribute @CompileTimeConstant; custom Java and XPath rules relying on them may report different results.

✨️ Merged pull requests

📦️ Dependency updates

📈️ Stats