Table of Contents

29-May-2026 - 7.25.0-SNAPSHOT

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

This is a minor release.

🚀️ New and noteworthy

Updated antlr library to 4.13.2

We have updated the antlr library (parser generator) from 4.9.3 to the latest version 4.13.2, in order to be able to use the latest version of Apex parser library.

This is an incompatible update: In case you use custom language modules based on antlr, you need to make sure to regenerate all of your lexers and parsers with the new antlr version.

For the antlr based language modules, that PMD ships (kotlin and swift and various CPD modules), this is already done.

🌟️ Changed Rules

🐛️ Fixed Issues

  • core
    • #4972: [core] Update antlr to 4.13.2
    • #6308: [core] CPD Markdown format: Add syntax highlighting
  • java
    • #5721: [java] StackOverflowError in 7.17.0 with nested wildcard generics
  • java-bestpractices
    • #3212: [java] Enhance UseStandardCharsets to flag some constructors of IO-related classes
  • java-codestyle
    • #2801: [java] OnlyOneReturn should have a property to allow early exits (guard clauses)
    • #6427: [java] UnnecessaryCast: False positive for long cast before bit-shift operations on int/byte
  • java-errorprone
    • #4288: [java] Document that CallSuperFirst/CallSuperLast are Android specific
    • #6163: [java] ConstructorCallsOverridableMethod: False positive when method is from enclosing class
    • #6517: [java] UselessPureMethodCall: False negative for methods on IntStream/LongStream/DoubleStream
  • java-multithreading
    • #6520: [java] DoNotUseThreads: False positive on legitimate java.lang.Thread.onSpinWait() call
  • kotlin
    • #6648: [kotlin] Multi-dollar interpolation parse error in annotations

🚨️ API Changes

✨️ Merged pull requests

  • #6084: [java] Shrink reported locations for some rules - UncleOwen (@UncleOwen)
  • #6522: [java] Fix #6520: DoNotUseThreads: fix false positive on Thread.onSpinWait() - leemeii (@leemeii)
  • #6524: [java] Fix #6517: UselessPureMethodCall: fix false negative for primitive streams - leemeii (@leemeii)
  • #6553: [java] Fix StackOverflowError in TypeOps projection of cyclic captured type vars - Sebastian Lövdahl (@slovdahl)
  • #6561: [java] Fix #6163: ConstructorCallsOverridableMethod: False positive with call to enclosing class - Lukas Gräf (@lukasgraef)
  • #6573: [java] Fix #6427: Add bitwise and/or/xor to BINARY_PROMOTED_OPS - UncleOwen (@UncleOwen)
  • #6587: [java] Fix #2801: Add a property to OnlyOneReturnRule to allow guard ifs - UncleOwen (@UncleOwen)
  • #6597: [java] Fix #3212: Enhance UseStandardCharsets - UncleOwen (@UncleOwen)
  • #6601: [java] Fix #4288: Document that CallSuperFirst and CallSuperLast are android only - UncleOwen (@UncleOwen)
  • #6605: [java] Fix #6308: Add syntax highlighting to MarkdownRenderer - UncleOwen (@UncleOwen)
  • #6621: [core] Fix #4972: Update antlr from 4.9.3 to 4.13.2 - UncleOwen (@UncleOwen)
  • #6623: [java] Cleanup: Remove TODO from ModifierOwner.getVisibility() - UncleOwen (@UncleOwen)
  • #6646: [test] Split up AbstractRuleSetFactoryTest.testAllPMDBuiltInRulesMeetConventions() - UncleOwen (@UncleOwen)
  • #6653: [kotlin] Fix #6648: Multi-dollar interpolation for regular strings - Peter Paul Bakker (@stokpop)
  • #6654: [swift] Fix invalid swift token OSXApplicationExtension - Andreas Dangel (@adangel)

📦️ Dependency updates

📈️ Stats