25 July 2025
The PMD team is pleased to announce PMD 7.16.0.
This is a minor release.
This release of PMD brings support for Java 25.
There are the following new standard language features:
And one preview language feature:
In order to analyze a project with PMD that uses these preview language features,
youβll need to enable it via the environment variable PMD_JAVA_OPTS and select the new language
version 25-preview:
export PMD_JAVA_OPTS=--enable-preview
pmd check --use-version java-25-preview ...
Note: Support for Java 23 preview language features have been removed. The version β23-previewβ is no longer available.
CPD now supports CSS (Cascading Style Sheets), a language for describing the rendering of structured
documents (such as HTML) on screen, on paper etc.
It is shipped with the new module pmd-css.
ReplaceJavaUtilCalendar
and ReplaceJavaUtilDate. These rules help to migrate away from old Java APIs around
java.util.Calendar and java.util.Date. It is recommended to use the modern java.time API instead, which
is available since Java 8._ASTImportDeclaration#isModuleImport is now stable API.ASTCompilationUnit#isCompact is now stable API. Note, it was previously
called isSimpleCompilationUnit.ASTImplicitClassDeclaration is now stable API.JavaVisitorBase#visit(ASTImplicitClassDeclaration, P) is now
stable API.