·
1 commit
to main
since this release
25-July-2025 - 7.16.0
The PMD team is pleased to announce PMD 7.16.0.
This is a minor release.
Table Of Contents
- π New and noteworthy
- π Fixed Issues
- π¨ API Changes
- β¨ Merged pull requests
- π¦ Dependency updates
- π Stats
π New and noteworthy
π New: Java 25 Support
This release of PMD brings support for Java 25.
There are the following new standard language features:
- JEP 511: Module Import Declarations
- JEP 512: Compact Source Files and Instance Main Methods
- JEP 513: Flexible Constructor Bodies
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.
New: CPD support for CSS
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
.
β¨ New Rules
- Two new rules have been added to Java's Error Prone category:
ReplaceJavaUtilCalendar
andReplaceJavaUtilDate
. These rules help to migrate away from old Java APIs around
java.util.Calendar
andjava.util.Date
. It is recommended to use the modernjava.time
API instead, which
is available since Java 8.
π Fixed Issues
- core
- java
- java-codestyle
- #5892: [java] ShortVariable false positive for java 22 unnamed variable
_
- #5892: [java] ShortVariable false positive for java 22 unnamed variable
- java-design
- #5858: [java] FinalFieldCouldBeStatic false positive for array initializers
- java-errorprone
- #2862: [java] New Rules: Avoid java.util.Date and Calendar classes
π¨ API Changes
Experimental APIs that are now considered stable
- pmd-java
ASTImportDeclaration#isModuleImport
is now stable API.ASTCompilationUnit#isCompact
is now stable API. Note, it was previously
calledisSimpleCompilationUnit
.ASTImplicitClassDeclaration
is now stable API.JavaVisitorBase#visit(ASTImplicitClassDeclaration, P)
is now
stable API.
β¨ Merged pull requests
- #5733: [css] Add new CPD language - Thomas Prouvot (@tprouvot)
- #5859: Fix #5858: [java] Fix false positive in FinalFieldCouldBeStatic for array initializers - Zbynek Konecny (@zbynek)
- #5872: [java] Add Support for Java 25 - Andreas Dangel (@adangel)
- #5876: chore: license header cleanup - Andreas Dangel (@adangel)
- #5883: Fix #2862: [java] Add rules discouraging the use of java.util.Calendar and java.util.Date - UncleOwen (@UncleOwen)
- #5893: chore: Fix Mockito javaagent warning for Java 21+ - Andreas Dangel (@adangel)
- #5894: chore: Fix JUnit warning about invalid test factory - Andreas Dangel (@adangel)
- #5895: Fix #5597: Move dogfood profile to separate settings.xml - Andreas Dangel (@adangel)
- #5899: Fix #5344: [java] Just log invalid annotation target type - Andreas Dangel (@adangel)
- #5909: [ci] Create a pre-release for snapshot builds - Andreas Dangel (@adangel)
- #5911: [doc] Reference CPD Capable Languages in CPD CLI docu - Andreas Dangel (@adangel)
- #5914: Fix #5892: [java] ShortVariable FP for java 22 Unnamed Variable - Lukas GrΓ€f (@lukasgraef)
- #5918: chore: [cli] Improve symbolic link tests for Windows - Andreas Dangel (@adangel)
- #5920: chore: [scala] Fix javadoc config - Andreas Dangel (@adangel)
π¦ Dependency updates
- #5857: Bump PMD from 7.14.0 to 7.15.0
- #5861: Bump scalameta.version from 4.13.7 to 4.13.8
- #5862: Bump com.puppycrawl.tools:checkstyle from 10.25.1 to 10.26.1
- #5863: Bump org.apache.maven.plugins:maven-pmd-plugin from 3.26.0 to 3.27.0
- #5864: Bump kotlin.version from 1.9.24 to 2.2.0
- #5865: Bump org.junit:junit-bom from 5.13.1 to 5.13.2
- #5866: Bump org.jsoup:jsoup from 1.20.1 to 1.21.1
- #5884: Bump org.junit:junit-bom from 5.13.2 to 5.13.3
- #5885: Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.7 to 3.2.8
- #5886: Bump org.checkerframework:checker-qual from 3.49.4 to 3.49.5
- #5889: Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.5.0 to 3.6.0
- #5900: Bump org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0
- #5901: Bump io.github.apex-dev-tools:apex-parser from 4.4.0 to 4.4.1
- #5902: Bump log4j.version from 2.25.0 to 2.25.1
- #5910: Bump maven from 3.9.10 to 3.9.11
- #5921: Bump build-tools from 32 to 33
- #5926: chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.0 to 3.6.1
- #5927: chore(deps): bump ostruct from 0.6.2 to 0.6.3 in /.ci/files in the all-gems group across 1 directory
- #5928: chore(deps): bump marocchino/sticky-pull-request-comment from 2.9.3 to 2.9.4 in the all-actions group
- #5929: chore(deps): Update gems
π Stats
- 100 commits
- 21 closed tickets & PRs
- Days since last release: 27