Repository navigation
Closed
Description
Java 25 will be released in September 2025 (PMD 7.18.0 is due end of September 2025).
OpenJDK 25 GA is scheduled for 2025/09/16.
I here list the JEPs I've so far confirmed to be of impact:
- 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)
- 511: Module Import Declarations
- 512: Compact Source Files and Instance Main Methods
- 513: Flexible Constructor Bodies
In summary: https://javaalmanac.io/jdk/25/
This issue is similar to the previous: #5154
EA Release of JDK25 is available here: https://jdk.java.net/25/
Tasks:
- Add new java language versions 25 and 25-preview:
net.sourceforge.pmd.lang.java.JavaLanguageModule- 25 is the new default
- update also java.md and ant.md
- and add in KotlinTestingDsl.kt.
- Update
net.sourceforge.pmd.lang.java.LanguageVersionTest - Update
net.sourceforge.pmd.lang.java.JavaLanguageModuleTest#previewVersionShouldBeGreaterThanNonPreview - Update
net.sourceforge.pmd.lang.java.ast.AllJavaAstTreeDumpTest - Update
net.sourceforge.pmd.dist.BinaryDistributionIT
- Update asm dependency to 9.8 ??:
- https://search.maven.org/artifact/org.ow2.asm/asm
- https://asm.ow2.io/versions.html
- Update net.sourceforge.pmd.lang.java.symbols.internal.asm.AsmSymbolResolver#ASM_API_V if necessary
- Already updated in 7.13.0 via Bump org.ow2.asm:asm from 9.7.1 to 9.8 #5656
- Remove java language version 23-preview:
net.sourceforge.pmd.lang.java.JavaLanguageModule- update also java.md
- update KotlinTestingDsl.kt
- remove exclusions in pmd-core/src/main/resources/internal/all-java.xml
- Update
net.sourceforge.pmd.lang.java.LanguageVersionTest - Remove
net.sourceforge.pmd.lang.java.ast.Java23PreviewTreeDumpTest(including resources) - Update
net.sourceforge.pmd.lang.java.ast.AllJavaAstTreeDumpTest - Update
net.sourceforge.pmd.dist.BinaryDistributionIT
- Update implementation for JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview)
- new preview: 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)
- "preview it for a third time, without change."
- Update implementation for JEP 492: Flexible Constructor Bodies (Third Preview)
- finalized: 513: Flexible Constructor Bodies
- "We here propose to finalize the feature in JDK 25, without change."
- Update implementation for JEP 494: Module Import Declarations (Second Preview)
- finalized: 511: Module Import Declarations
- "We here propose to finalize the feature in JDK 25, without change."
- Update implementation for JEP 495: Simple Source Files and Instance Main Methods (Fourth Preview)
- finalized: 512: Compact Source Files and Instance Main Methods
- "We here propose to finalize the feature in JDK 25, renaming simple source files to compact source files, with several minor improvements"
- https://cr.openjdk.org/~gbierman/jep512/jep512-20250422/specs/compact-source-files-instance-main-methods-jls.html
- Write release notes
- removed experimental: TODO
- removed classes: TODO
- deprecated classes: TODO
- new experimental: TODO
- Make sure, we can build PMD with JDK25
- ⚠ The kotlin-maven-plugin seems to be incompatible with java 25-ea
- Maybe we need to upgrade it? See Bump kotlin.version from 1.9.24 to 2.2.0 #5864
- Maybe setting language version / api version helps? see https://kotlinlang.org/docs/maven.html#attributes-specific-to-jvm
- Turns out, we have to upgrade
- see https://youtrack.jetbrains.com/issue/KT-73967/JDK-25-IllegalArgumentException-25-ea-with-EA-builds
- Kotlin-Compiler was originally limited up to Java 24... see this fix JetBrains/kotlin@e0bf708
- We need to upgrade to at least 2.1.20
- Add JDK25 to the build, so that we integration test with 25, if this is a LTS version
- integration test in pmd-dist
- Yes - Java 25 will be a LTS release
- see [ci] Run integration test with Java 25 #5873
- Update https://github.com/pmd/java-regression-tests
- new regular language features, so update needed
- Note: This can only be done, after this issue has been implemented
- see [java] Update java regression tests with Java 25 language features #5874
- Create a new issue for the next Java version 26
Reacted by Vincent Potuček
Metadata
Metadata
Assignees
Labels
an:enhancementAn improvement on existing features / rules
Activity
Pankraz76 commentedon Jun 11, 2025
let me know, if you need help.
[doc] Update release notes (pmd#5478)
adangel commentedon Jul 3, 2025
I've created now a PR for that - if you could review/test it, that would be great! -> #5872
Pankraz76 commentedon Jul 4, 2025
how to checkout this branch, as its not in origin, can i pull from you´r remote? Without secu settings adjusted i dont think so.
Thx
adangel commentedon Jul 4, 2025
yes you can, my fork is public as well: https://github.com/adangel/pmd/tree/java/issue-5478-support-java-25
something like this...
adangel commentedon Jul 4, 2025
Oh, and you can also just download the binary distribution from the PR build:
-> https://github.com/pmd/pmd/pull/5872/checks
In the middle, there is "Artifacts (6)" where you can download the dist-artifact, which contains the already compiled PMD.
Pankraz76 commentedon Jul 13, 2025
might consider dedicated recipe for this, as well.
adangel commentedon Jul 17, 2025
I don't want to upgrade PMD to Java 25 (yet), I just want to be able to analyze Java applications written in Java 25 with PMD - that's what this issue is about.
Could you verify, whether it this works?
Pankraz76 commentedon Jul 17, 2025
not yet sorry, in just around 4 weeks the release is there yes?
adangel commentedon Jul 18, 2025
Well, PMD's release is next Friday, and Java 25 GA is in September. But, as you can see in the issue description, there are EA builds available to test: