GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • PMD Source Code Analyzer Project
  • Nav
  • Download
  • GitHub
  • Edit on GitHub

This view

  • Original page
  • New address

GeezerVison is showing docs.pmd-code.org (truncated) — Old Release Notes PMD 7.x | PMD Source Code Analyzer

 
  • PMD 7.31.0-SNAPSHOT
  • Release date: 28-December-2026
  • About
    • Home
    • Release notes
    • Getting help
    • Release policies
    • Support lifecycle
    • Security
  • User Documentation
    • Migration Guide for PMD 7
    • Installation and basic CLI usage
    • Making rulesets
    • Configuring rules
    • Best practices
    • Suppressing warnings
    • Incremental analysis
    • PMD CLI reference
    • PMD Report formats
    • 3rd party rulesets
    • Signed Releases
    • CPD reference
      • Copy-paste detection
      • CPD Report formats
    • Extending PMD
      • Introduction to writing rules
      • Your first rule
      • XPath rules
      • Java rules
      • Rule designer reference
      • Defining rule properties
      • Rule guidelines
      • Testing your rules
      • Creating (XML) dump of the AST
    • Tools / Integrations
      • Maven PMD Plugin
      • Gradle
      • Ant
      • PMD Java API
      • bld PMD Extension
      • CI integrations
      • IDE Plugins
      • Other Tools / Integrations
  • Rule Reference
    • Apex Rules
      • Index
      • Best Practices
      • Code Style
      • Design
      • Documentation
      • Error Prone
      • Performance
      • Security
    • HTML Rules
      • Index
      • Best Practices
    • Java Rules
      • Index
      • Best Practices
      • Code Style
      • Design
      • Documentation
      • Error Prone
      • Multithreading
      • Performance
      • Security
    • Java Server Pages Rules
      • Index
      • Best Practices
      • Code Style
      • Design
      • Error Prone
      • Security
    • JavaScript Rules
      • Index
      • Best Practices
      • Code Style
      • Error Prone
      • Performance
    • Kotlin Rules
      • Index
      • Best Practices
      • Error Prone
    • Maven POM Rules
      • Index
      • Error Prone
    • Modelica Rules
      • Index
      • Best Practices
    • PLSQL Rules
      • Index
      • Best Practices
      • Code Style
      • Design
      • Error Prone
    • Salesforce Visualforce Rules
      • Index
      • Security
    • Scala Rules
      • Index
    • Swift Rules
      • Index
      • Best Practices
      • Error Prone
    • Velocity Template Language (VTL) Rules
      • Index
      • Best Practices
      • Design
      • Error Prone
    • WSDL Rules
      • Index
    • XML Rules
      • Index
      • Best Practices
      • Error Prone
    • XSL Rules
      • Index
      • Code Style
      • Performance
  • Language-Specific Documentation
    • Overview
    • Language configuration
    • Apex
    • C/C++
    • C#
    • CSS
    • Coco
    • Dart
    • Fortran
    • Gherkin
    • Go
    • HTML
    • Java
    • JavaScript / TypeScript
    • JSP
    • Julia
    • Kotlin
    • Lua
    • Matlab
    • Modelica
    • Objective-C
    • Perl
    • PHP
    • PLSQL
    • Python
    • Ruby
    • Rust
    • Scala
    • Swift
    • T-SQL
    • Visualforce
    • Velocity Template Language (VTL)
    • XML and XML dialects
  • Developer Documentation
    • Contributing
      • Contributing
      • Developer resources
      • Newcomers' Guide
      • Writing documentation
    • Building PMD
      • General Info
      • Building PMD from source
      • Building PMD with IntelliJ IDEA
      • Building PMD with Eclipse IDE
      • Building PMD with VS Code IDE
      • Building PMD with Netbeans IDE
    • Roadmap
    • GitHub Actions Workflows
    • How PMD works
    • Logging
    • Pmdtester
    • Rule Deprecation Policy
    • Major contributions
      • Rule Guidelines
      • Adding a new dialect
      • Adding a new language (JavaCC)
      • Adding a new language (ANTLR)
      • Adding a new CPD language
    • Experimental features
      • List of experimental Features
  • Project documentation
    • Trivia about PMD
      • PMD in the press
      • Products & books related to PMD
      • Similar projects
      • What does 'PMD' mean?
    • Logo
    • FAQ
    • License
    • Credits
    • Old Release Notes
      • Release Notes PMD 7.x
      • Detailed Release Notes PMD 7.0.0
      • Release Notes PMD 6.x
      • Release Notes PMD 5.x
      • Release Notes PMD 4.x and earlier
    • Decisions
    • Project management
      • Infrastructure
      • Release process
      • Merging pull requests
      • Main Landing page

Old Release Notes PMD 7.x

Table of Contents

Previous versions of PMD can be downloaded here: Releases - pmd/pmd (GitHub)

27-November-2026 - 7.30.0

The PMD team is pleased to announce PMD 7.30.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Security fixes
    • Updated PMD Designer
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes and Deprecations
    • Experimental API
    • Deprecations
    • Other API changes
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Security fixes

All known security vulnerabilities are described in full detail on the page PMD Security. This release, the following security vulnerabilities were fixed:

  • GHSA-p8c4-pmh9-36vf: Uncontrolled recursion (StackOverflowError) in regex matching of several PMD rules for crafted input.
    Several rules (UnnecessaryImport, AvoidUsingHardCodedIP, VfUnescapeEl) used regular expressions that could throw a StackOverflowError on crafted, very long input (for example a Javadoc comment, string literal or attribute value of a few kilobytes), which aborted the whole analysis run. The patterns now match in linear time without deep recursion, so such input no longer causes an error.
    Affected versions: net.sourceforge.pmd:pmd-core >= 7.0.0, <= 7.29.0; net.sourceforge.pmd:pmd-java >= 6.34.0, <= 7.29.0; net.sourceforge.pmd:pmd-visualforce >= 5.6.0, <= 7.29.0

Updated PMD Designer

This PMD release ships a new version of the pmd-designer. PMD’s binary distribution now ships ControlsFX 8 for Java 8 and ControlsFX 11 for OpenJFX and Java 11+. Java 9 and 10 are not supported.
For the changes, see PMD Designer Changelog (7.30.0).

🌟️ New and Changed Rules

New Rules

  • The new Java rule ControlFlowInTest reports control flow in test methods that can obscure which assertions are executed. It checks conditionals, switch statements and expressions, explicit throw statements, try statements with catch clauses, and plain try-finally statements. Loops are allowed by default and can be reported by setting allowLoops to false.

Changed Rules

  • The Apex rule ApexUnitTestShouldNotUseSeeAllDataTrue has a new property reportConnectApi. It defaults to true. Set it to false, and the rule does not report seeAllData=true on a test class or test method that calls a ConnectApi method, since most ConnectApi methods require seeAllData=true in tests. A call to a setTest... method does not stop the rule from reporting, because it only registers test data. Nor does a call to the regular method whose test data a setTest... call in the same test registers (see #7236).

Deprecated Rules

  • The Java rule AddEmptyString is deprecated without replacement and will be removed with PMD 8.0.0. Its performance claim is not valid on modern JDKs: constant string concatenations are evaluated at compile time, and replacing concatenation with toString() or String.valueOf() does not generally improve performance. The rule is excluded when referencing the whole Performance category, but explicit rule references continue to work during the deprecation period.

🐛️ Fixed Issues

  • apex
    • #7108: [apex] Expose DML AccessMode (as user / as system) for XPath rules
    • #7182: [apex] Expose the referenced type name on ClassRefExpression for XPath rules
  • apex-bestpractices
    • #5669: [apex] ApexUnitTestMethodShouldHaveIsTestAnnotation: Violation range should only cover the method name
    • #7236: [apex] ApexUnitTestShouldNotUseSeeAllDataTrue: False positive for test classes that call ConnectApi
  • apex-design
    • #4863: [apex] CyclomaticComplexity: False negative with switch statements
  • apex-errorprone
    • #5906: [apex] MethodWithSameNameAsEnclosingClass: Violation range should only cover the method name
  • core
    • #5760: [core] SarifRenderer does not respect relativizeRoots
  • java
    • #7144: [java] Lambda block body that cannot complete normally is not treated as value-compatible
    • #7240: [java] “Not a Java binary name” when importing a class with non-ASCII (e.g. Japanese) letters in its name; the whole file is skipped
    • #7313: [java] Casts to boolean and boolean equality are not folded as constant expressions
  • java-bestpractices
    • #5016: [java] UnusedAssignment: False positive boolean flag for execution and reset in finally
    • #7070: [java] CheckResultSet: False negative caused by unrelated if/while
    • #7116: [java] New rule: ControlFlowInTest
    • #7216: [java] GuardLogStatement: False positive on SLF4J parameterised calls whose arguments are wrapped with logstash value(…)
  • java-codestyle
    • #6731: [java] UnnecessaryFullyQualifiedName: False positive for lombok.Builder annotation
    • #7215: [java] UnnecessaryImport: False positive for on-demand imports with incomplete aux-classpath
    • #7396: [java] UnnecessaryImport: Fix StackOverflowError for very long Javadoc references
  • java-design
    • #5798: [java] NPathComplexity: Short-circuit operators outside of conditions counted as branches
    • #7277: [java] AvoidRethrowingException: False negative if rethrow is wrapped in a block, ExceptionAsFlowControl false positive instead
    • #7279: [java] InternalApiUsage: False positive when static field is used in constructor
  • java-errorprone
    • #4531: [java] MissingStaticMethodInNonInstantiatableClass: False positive with multiple top-level classes
    • #7275: [java] AvoidBranchingStatementAsLastInLoop: False negative when the statement is in a bare block
  • java-multithreading
    • #2786: [java] UseConcurrentHashMap: False positive for ConcurrentSkipListMap
  • java-performance
    • #6327: [java] AddEmptyString: Deprecate rule because performance claim is not valid anymore
    • #7327: [java] AvoidArrayLoops: False negative for a copy loop whose body has no braces
  • jsp
    • #5092: [jsp] Parse error when <!DOCTYPE> or <?xml?> follows other content
  • kotlin
    • #7168: [kotlin] Add @TypeName to VariableDeclaration, fix destructuring type leak
    • #7171: [kotlin] Support the ..< range operator (Kotlin 1.9)
  • misc
    • #6655: Deprecate ANTLR generated lexer implementation classes

🚨️ API Changes and Deprecations

  • apex
    • DML statement nodes now expose @AccessMode. The attribute is always present. Its value is IMPLICIT, USER_MODE, or SYSTEM_MODE. //DmlInsertStatement[@AccessMode='IMPLICIT'] and //DmlInsertStatement[@AccessMode='SYSTEM_MODE'] select those statements.

Experimental API

  • kotlin
    • KtVariableDeclarationAttributes now implements HasTypeName, so VariableDeclaration nodes have a @TypeName attribute. This covers property and for-loop variables, lambda parameters, and each component of a destructuring declaration (val (a, b) = ..., for ((a, b) in ...), { (a, b) -> ... }). The XPath functions pmd-kotlin:typeIs, pmd-kotlin:typeIsExactly and pmd-kotlin:isNullable support VariableDeclaration nodes as well.
    • A destructuring PropertyDeclaration (e.g. val (a, b) = Pair(1, "x")) no longer has a @TypeName. Before, it wrongly got the type of the first component. To find destructured variables by type, query the component nodes instead: //VariableDeclaration[pmd-kotlin:typeIs('kotlin.Int')].

Deprecations

  • apex
    • AbstractDmlStatement#getRunAsMode has been deprecated. Use getAccessMode instead.
  • coco
    • CocoLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • css
    • CssLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • csharp
    • CSharpLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • dart
    • DartLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • gherkin
    • GherkinLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • go
    • GolangLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • javascript
    • TypeScriptLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • julia
    • JuliaLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • kotlin
    • KotlinBaseListener has been deprecated. The class is an implementation detail and should have never been part of the public API.
    • KotlinLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
    • KotlinListener has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • lua
    • LuaLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • rust
    • RustLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • swift
    • SwiftBaseListener has been deprecated. The class is an implementation detail and should have never been part of the public API.
    • SwiftLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
    • SwiftListener has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • tsql
    • TSqlLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • xml
    • XMLLexer has been deprecated. The class is an implementation detail and should have never been part of the public API.
  • The generated KotlinParser and SwiftParser classes and their nested AST node classes are intentionally not deprecated yet. These classes still contain the public AST node types, which have no replacement API yet. They will be deprecated once we have decided how to handle the inner classes.

Other API changes

  • xml
    • The new class XmlRootNode is the root node of the XML AST. It replaces the class XmlParserImpl.RootXmlNode, which was in an internal package. XmlNode#getRoot now returns XmlRootNode.
    • XmlParser is now public and has moved from package net.sourceforge.pmd.lang.xml into net.sourceforge.pmd.lang.xml.ast, like the parsers of other languages.
    • The internal package net.sourceforge.pmd.lang.xml.ast.internal has been removed. Its classes are now package-private in net.sourceforge.pmd.lang.xml.ast.

✨️ Merged pull requests

  • #7168: [kotlin] Add @TypeName to VariableDeclaration, fix destructuring type leak - Peter Paul Bakker (@stokpop)
  • #7172: Fix #6655: Deprecate antlr4 generated lexers - Sören Glimm (@UncleOwen)
  • #7175: [core] Fix #5760: Honor relative paths in SARIF reports - subotac (@subotac)
  • #7176: [apex] Fix #4863: Count switch cases in cyclomatic complexity - subotac (@subotac)
  • #7179: [kotlin] Fix #7171: Support the ..< range operator (Kotlin 1.9) - Andrew Hannah (@ahannah9)
  • #7181: [core] chore: Report unprocessed files in DeterministicOutputListenerWrapper - Shivam Maurya (@shivampwm2020)
  • #7192: [java] Fix #7070: CheckResultSet under unrelated if and while conditions - João Gabriel Alves Junior (@Gabrieljr42)
  • #7195: [doc] Remove unnecessary scrollbars - Zbynek Konecny (@zbynek)
  • #7196: [apex] Fix #7108: Expose DML AccessMode as XPath attribute - João Gabriel Alves Junior (@Gabrieljr42)
  • #7198: [java] Fix #6731: Support lombok.Builder (fix UnnecessaryFullyQualifiedName false positive) - markxu (@markjoin123)
  • #7201: [apex] Fix #7182: Expose the referenced type name on ClassRefExpression - Lyin-OTTF (@Lyin-OTTF)
  • #7202: [java] Fix #4531: MissingStaticMethodInNonInstantiatableClass false positive with multiple top-level classes - markxu (@markjoin123)
  • #7217: [java] Fix #7215: Handle qualified types from unresolved on-demand imports - Eymen Onar (@Eymenonar)
  • #7218: [java] Fix #7144: Fix lambda block body compatibility - Noor Ahmadi (@noor-ahmadi)
  • #7225: [java] Fix #7216: GuardLogStatement: accept logstash structured arguments - Prince Jain (@princejain756)
  • #7235: [java] Fix #5016: UnusedAssignment: field may be read by a method call - Vincent Potuček (@Pankraz76)
  • #7237: [apex] Fix #7236: ApexUnitTestShouldNotUseSeeAllDataTrue: Add reportConnectApi property - David Schach (@dschach)
  • #7243: [java] Lombok: don’t double the is prefix of boolean getters - Vincent Potuček (@Pankraz76)
  • #7244: [core] Fix #7240: Accept non-ASCII letters in Java binary and package names - JohnnyXu (@xubenqiang)
  • #7246: [java] Fix #7116: Add ControlFlowInTest rule - Michal Kollarčik (@MichalKollarcik)
  • #7252: [jsp] Fix #5092: Allow XML declaration and doctype after other content - Daksh Tyagi (@InnoxCodes)
  • #7253: [java] Fix #5798: NPath should not count && and   in plain value expressions - Daksh Tyagi (@InnoxCodes)
  • #7255: [dist] Ship ControlsFX 8 and 11 for the designer - Andreas Dangel (@adangel)
  • #7256: [doc] Fix deleted assertion rule names in PMD 7 release notes - Greg Oledzki (@greg-at-moderne)
  • #7257: [cli] Refactor progress bar logic - Andreas Dangel (@adangel)
  • #7258: [doc] Remove pmd-commits mailing list from doc - Andreas Dangel (@adangel)
  • #7263: [apex] Fix #5669: Report ApexUnitTestMethodShouldHaveIsTestAnnotation only on the method name - HawkForge (@HawkForge)
  • #7264: [apex] Fix #5906: MethodWithSameNameAsEnclosingClass range is too broad - HawkForge (@HawkForge)
  • #7280: [java] Fix #7279: InternalApiUsage false positive in records and enums - dodoshell (@dodoshell)
  • #7283: [java] Fix #7275: Handle bare blocks in AvoidBranchingStatementAsLastInLoop - kayokoi Zhang (@wozhenbang2004)
  • #7286: [doc] Add commercial support section - Andreas Dangel (@adangel)
  • #7287: [java] Fix #7277: Recognize rethrows through bare blocks - João Gabriel Alves Junior (@Gabrieljr42)
  • #7301: [java] Prepare deprecation of asCtx in pmd-java (part of #4814) - Sören Glimm (@UncleOwen)
  • #7303: [core] Remove FileUtil.java - Sören Glimm (@UncleOwen)
  • #7311: [java] Fix #6237: Deprecate AddEmptyString without replacement - Amrit Kang (@amritkang165)
  • #7314: [java] Fix #7313: Fold casts to boolean and boolean equality - sary (@saryn17)
  • #7334: [doc] Fix dead links in the docs and README - Mark Santos (@markksantos)
  • #7344: [cli] Fix hanging PmdCliTest under Windows with git bash - Andreas Dangel (@adangel)
  • #7351: [xml] refactor: move internal AST classes into package lang.xml.ast - Andreas Dangel (@adangel)
  • #7368: chore: Store mvnw.cmd with CRLF as-is - Andreas Dangel (@adangel)
  • #7369: [doc] Improve issue templates using forms - Andreas Dangel (@adangel)
  • #7370: [ci] Add PR automation workflows - Andreas Dangel (@adangel)
  • #7371: [ci] Add workflow to clean up stale pull request reports - Andreas Dangel (@adangel)
  • #7375: [java] Fix #2786: Exempt ConcurrentMap implementations from UseConcurrentHashMap - kayokoi Zhang (@wozhenbang2004)
  • #7396: [java] UnnecessaryImport: Fix StackOverflowError for very long Javadoc references - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #7265: Bump PMD from 7.28.0 to 7.29.0
  • #7288: chore(deps): bump ruby/setup-ruby from 1.335.0 to 1.336.0
  • #7289: chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.15 to 0.8.16
  • #7290: chore(deps): bump csv from 3.3.6 to 3.3.7 in /docs
  • #7291: chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.3 to 3.7.0
  • #7292: chore(deps-dev): bump all-contributors-cli from 6.26.1 to 7.0.0
  • #7293: chore(deps): bump com.puppycrawl.tools:checkstyle from 14.3.0 to 14.4.0
  • #7316: chore(deps): bump actions/setup-java from 6.1.0 to 6.2.0
  • #7317: chore(deps): bump ruby/setup-ruby from 1.336.0 to 1.338.0
  • #7318: chore(deps): bump byte.buddy.version from 1.18.16 to 1.18.17
  • #7319: chore(deps): bump crate-ci/typos from 1.51.1 to 1.52.0
  • #7320: chore(deps-dev): bump com.google.guava:guava from 33.7.2-jre to 33.8.0-jre
  • #7321: chore(deps-dev): bump net.logstash.logback:logstash-logback-encoder from 8.1 to 9.0
  • #7322: chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.23.0 to 2.24.0
  • #7324: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.26.5 to 0.27.0
  • #7325: chore(deps): bump org.codehaus.mojo:build-helper-maven-plugin from 3.6.2 to 3.7.0
  • #7326: chore(deps): bump org.jsoup:jsoup from 1.23.2 to 1.24.1
  • #7350: chore(deps): bump addressable from 2.9.0 to 2.9.1 in /docs
  • #7352: chore(deps): bump nokogiri from 1.19.4 to 1.19.5 in /.ci/files
  • #7356: chore(deps): bump actions/setup-java from 6.2.0 to 6.3.0
  • #7357: chore(deps): bump org.codehaus.mojo:build-helper-maven-plugin from 3.7.0 to 3.8.0
  • #7358: chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.6.4 to 3.7.0
  • #7359: chore(deps): bump org.apache.maven:apache-maven from 3.10.0 to 3.10.1
  • #7360: chore(deps): bump org.apache.commons:commons-lang3 from 3.21.0 to 3.22.0
  • #7361: chore(deps-dev): bump all-contributors-cli from 7.0.0 to 7.0.2
  • #7362: chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.24.0 to 2.25.2
  • #7363: chore(deps-dev): bump org.apache.maven.plugins:maven-help-plugin from 3.5.2 to 3.6.0
  • #7364: chore(deps): bump crate-ci/typos from 1.52.0 to 1.52.2
  • #7385: chore(deps): bump actions/create-github-app-token from 3.3.0 to 3.4.0
  • #7386: chore(deps): bump ruby/setup-ruby from 1.338.0 to 1.343.0
  • #7387: chore(deps): bump org.apache.maven:apache-maven from 3.10.1 to 3.10.2
  • #7389: chore(deps-dev): bump all-contributors-cli from 7.0.2 to 7.0.3
  • #7390: chore(deps-dev): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.8.0.7211 to 5.9.0.7382

📈️ Stats

  • 84 commits
  • 73 closed tickets & PRs
  • Days since last release: 27

30-October-2026 - 7.29.0

The PMD team is pleased to announce PMD 7.29.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Security fixes
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Security fixes

All known security vulnerabilities are described in full detail on the page PMD Security. This release, the following security vulnerabilities were fixed:

  • GHSA-wj6q-xw9m-26p6: Arbitrary file disclosure in CPD via symlinks in analyzed sources.
    When collecting files, CPD followed symbolic links, even if their targets were outside the scanned directory. This allowed reading any file accessible to the user running CPD. If a CI/CD pipeline runs CPD on untrusted source code (e.g. a pull request from an external contributor), an attacker could commit two symlinks pointing to the same file outside the project. CPD detected them as duplicates and wrote the full content of the target file into the report. If the report was published, e.g. as a CI artifact, the attacker could read it.
    With this fix, neither PMD nor CPD follows symbolic links anymore when collecting files to analyze.
    Affected versions: PMD >= 6.54.0 and <= 7.28.0. If you run CPD on untrusted source code, it is recommended to upgrade PMD.
    Reported by Dan (@7alen7). Independently reported by lapeace (@ThejasRajamoney).
  • GHSA-5x5v-644m-q2qc: XSS via externalInfoUrl in HTML report formats.
    The html and summaryhtml renderers inserted a rule’s externalInfoUrl into generated reports without escaping or URL-scheme validation. With a crafted ruleset, this allowed injected markup that runs when the report is opened (with --show-suppressed), or javascript: links that run when clicked. This only affects setups where PMD loads an untrusted ruleset and the resulting HTML report is viewed in a browser.
    Affected versions: PMD 7.28.0 and earlier. If you use the html or summaryhtml report formats, it is recommended to upgrade PMD.
    Reported by lapeace (@ThejasRajamoney).
  • GHSA-x2h8-xxj6-pf6c: XSS via rule name in summaryhtml report format.
    The summaryhtml renderer wrote rule names into the report without HTML escaping. A ruleset with a crafted rule name could inject JavaScript that runs in the browser of anyone who opens the report. This affects setups that use --format summaryhtml together with a ruleset from an untrusted source, e.g. CI/CD pipelines that use a ruleset from a pull request by an external contributor. If the report is served from a web host (e.g. a CI dashboard), the script runs in that origin. This is a follow-up to CVE-2026-28338, whose fix did not cover the summaryhtml renderer.
    Affected versions: PMD 7.28.0 and earlier. If you use the summaryhtml report format, it is recommended to upgrade PMD.
    Reported by Dan (@7alen7). Independently reported by lapeace (@ThejasRajamoney).
  • GHSA-9hm5-r2r7-hjcq: Local file reads through XXE in PMD rule tests.
    Normal usage of PMD for analyzing source code is not affected. Only projects that develop custom rules and test them with PMD’s rule test framework (modules pmd-test and pmd-test-schema) are affected.
    The parser for rule-test XML files did not disable DTDs and external entities. A crafted rule-test XML file could therefore read a local file and place its contents into a parsed test description. Since the description is used as the name of the JUnit test, the file contents could appear in test results. This is relevant when rule-test XML files from untrusted sources are executed, e.g. in a CI/CD pipeline for pull requests from external contributors.
    With this fix, DTDs are disabled. Rule-test XML files containing a DOCTYPE declaration are rejected. This was never officially supported, as PMD doesn’t provide a DTD for rule-test XML files.
    Affected versions: pmd:pmd >= 3.9, net.sourceforge.pmd:pmd-test <= 6.47.0, net.sourceforge.pmd:pmd-test-schema <= 7.28.0. If you test custom rules with PMD’s rule test framework, it is recommended to upgrade PMD.
    Reported by lapeace (@ThejasRajamoney).
  • GHSA-wv72-2ccf-28gj: Blind SSRF through Visualforce metadata parser.
    When resolving custom field types, the Visualforce module parsed Salesforce *.field-meta.xml files from the analyzed source tree without disabling external DTD loading. A crafted metadata file could therefore make PMD send a request to an attacker-chosen URL during analysis. This affects users who analyze Visualforce code from untrusted sources, such as pull requests.
    Affected versions: net.sourceforge.pmd:pmd-visualforce >= 6.30.0, <= 7.28.0
    Reported by lapeace (@ThejasRajamoney).
  • GHSA-jm8j-h474-h54h: Formula injection in CSV report format via unescaped quotes in file names.
    The CSV renderer neither escaped embedded double quotes nor neutralized values starting with formula trigger characters (=, +, -, @). This let a crafted source filename, or a rule name, ruleset name or rule message from an attacker-controlled ruleset, inject a formula into the CSV report, which a spreadsheet application could evaluate when the report is opened.
    Affected versions: pmd:pmd >= 1.2, net.sourceforge.pmd:pmd-core <= 7.28.0
    Reported by lapeace (@ThejasRajamoney). Independently reported by Hama1cco (@Hama1cco).

🌟️ New and Changed Rules

New Rules

  • The new Java rule ReplaceJavaUtilVector reports usages of java.util.Vector, including subclasses such as Stack, and suggests modern alternatives when thread safety is not required. It recommends ArrayList for Vector and Deque with an implementation such as ArrayDeque for Stack. A declaration such as Vector<String> v = new Vector<>() is reported only once, not twice. It replaces the rules ReplaceVectorWithList and UseArrayListInsteadOfVector, which are now deprecated (see below).
  • The new Java rule LocalVariableDeclarationShouldBeAtStartOfBlock enforces a code style where all local variables are declared together at the start of their block, without initialization. Optionally, the declarations can be required to be sorted by name or by type and name (see properties sortBy and caseSensitiveSorting).
  • The new Kotlin rule LooseCoupling reports declarations (properties, parameters, function return types) using concrete collection/map implementation types (e.g. ArrayList, HashMap) instead of the corresponding interface (e.g. List, Map). It is powered by the pmd-kotlin:typeIs() XPath function introduced in PMD 7.28.0.

Changed Rules

  • Several Java rules now benefit from improved constant folding (see #7060), which now recognizes final local variables and unqualified instance fields initialized with constant expressions. This may change the reported violations of the following rules: AvoidReassigningLoopVariables, LiteralsFirstInComparisons, UnusedAssignment, FinalFieldCouldBeStatic, UnconditionalIfStatement, UnusedNullCheckInEquals. Notably, LiteralsFirstInComparisons may report new violations when such a constant is the argument of a comparison.
  • The Java rule UseExplicitTypes has a new property allowLongTypeNames. It allows using var when the explicit type name would be longer than a given minimum length configured with this property.

Deprecated Rules

  • The Java rules ReplaceVectorWithList and UseArrayListInsteadOfVector are deprecated aliases of ReplaceJavaUtilVector. Update rule references to use the new name.

🐛️ Fixed Issues

  • apex-performance
    • #5082: [apex] EagerlyLoadedDescribeSObjectResult: False positive with fully qualified SObjectDescribeOptions/FieldDescribeOptions
  • core
    • #6912: [core] Include XML validation details in ruleset loading errors
    • #7072: [core] Reuse compiled violationSuppressXPath queries
    • #7156: [core] Analysis cache fails with ZipException on invalid archive on the auxclasspath
  • groovy
    • #7110: [groovy] CPD fails on GStrings that end in an interpolated variable
  • html
    • #5313: [html] CPD does not include the last line in the duplication chunk
    • #7166: [html] endcolumn of nodes is off-by-one
  • java
    • #7048: [java] Deprecate getImage()/@Image and remove usages
    • #7054: [java] IllegalArgumentException with wildcard in the upper bound of a type variable, in a lambda or method reference
    • #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
    • #7146: [java] Overload resolution prefers int over Integer where javac reports an ambiguity
    • #7148: [java] Strict phase rejects lambda and method reference results that need boxing
    • #7149: [java] Loose invocation conversion accepts int to Long and null to int
    • #7150: [java] Numeric conditional with a char operand and an int constant is typed as int
    • #7151: [java] Unqualified method call resolves to an enclosing class method that the inner class hides
  • java-bestpractices
    • #5159: [java] UnusedAssignment: False positive when using assert
    • #6546: [java] New Rule: ReplaceJavaUtilVector to consolidate ReplaceVectorWithList / UseArrayListInsteadOfVector
    • #6984: [java] ExhaustiveSwitchHasDefault: Improve violation messages to list missing cases
    • #7018: [java] UnusedAssignment: False positive for an assignment in a condition operand that may be skipped
    • #7063: [java] CheckResultSet: False positive for rs.next() ? x : y
    • #7119: [java] SimplifiableTestAssertion: False negatives for assertInstanceOf, assertNull, assertNonNull
    • #7213: [java] UnusedPrivateMethod / UnusedPrivateField: False positives for fully qualified @MethodSource / @FieldSource references
  • java-codestyle
    • #4576: [java] UseShortArrayInitializer: False positive with arrays of parametrized types (generic array creation)
    • #6409: [java] UnnecessaryCast: False positive for anonymous class in Stream.map() with toList()
    • #6882: [java] New Rule: Enforce local variable declarations to be at the start of a block
    • #6903: [java] Enhance UseExplicitTypes to allow verbose long explicit types
  • java-design
    • #4815: [java] ExceptionAsFlowControl: False positive on Lambda/asynchronous
    • #7117: [java] ExceptionAsFlowControl: False negative when the lambda is invoked by the method it is passed to
  • java-errorprone
    • #5158: [java] SingletonClassReturningNewInstance: False positive due to type cast
    • #7137: [java] InvalidLogMessageFormat: False positive for unresolved exception type (incomplete auxclasspath)
  • java-multithreading
    • #7120: [java] NonThreadSafeSingleton: throws NoSuchElementException on a record that null checks its own fields
  • java-security
    • #7014: [java] InsecureCryptoIv/HardCodedCryptoKey: False negative when a hard-coded array is constructed through array element assignments
    • #7015: [java] InsecureCryptoIv/HardCodedCryptoKey: False negative for unchanged default-initialized arrays
  • kotlin-bestpractices
    • #7092: [kotlin] New Rule: LooseCoupling
  • matlab
    • #2258: [matlab] CPD: Parse error with backslashes in character vectors/string literals
  • plsql
    • #6609: [plsql] Parse exception when comparing a parenthesized arithmetic expression in a WHERE clause
    • #7223: [plsql] Deprecate AST node ASTKEYWORD_UNRESERVED

🚨️ API Changes

  • pmd-java
    • 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.
    • As part of Deprecate getImage()/@Image (#4787), the @Image attribute and getImage() method of multiple AST nodes have been deprecated:
      • ASTAmbiguousName#getImage: The @Image attribute of AmbiguousName has been deprecated. Use @Name instead.
      • ASTBreakStatement#getImage: The @Image attribute of BreakStatement has been deprecated. Use @Label instead.
      • ASTConstructorDeclaration#getImage: The @Image attribute of ConstructorDeclaration has been deprecated. Use @Name instead.
      • ASTContinueStatement#getImage: The @Image attribute of ContinueStatement has been deprecated. Use @Label instead.
      • ASTFieldAccess#getImage: The @Image attribute of FieldAccess has been deprecated. Use @Name instead.
      • ASTImportDeclaration#getImage: The @Image attribute of ImportDeclaration has been deprecated. Use @ImportedName instead. Note: This method always returns null. Don’t use it. It is only deprecated for consistency.
      • ASTLabeledStatement#getImage: The @Image attribute of LabeledStatement has been deprecated. Use @Label instead.
      • ASTMemberValuePair#getImage: The @Image attribute of MemberValuePair has been deprecated. Use @Name instead.
      • ASTMethodCall#getImage: The @Image attribute of MethodCall has been deprecated. Use @MethodName instead.
      • ASTMethodDeclaration#getImage: The @Image attribute of MethodDeclaration has been deprecated. Use @Name instead. Note: This method always returns null. Don’t use it. It is only deprecated for consistency.
      • ASTPackageDeclaration#getImage: The @Image attribute of PackageDeclaration has been deprecated. Use @Name instead. Note: This method always returns null. Don’t use it. It is only deprecated for consistency.
      • ASTTypeParameter#getImage: The @Image attribute of TypeParameter has been deprecated. Use @Name instead.
      • ASTVariableAccess#getImage: The @Image attribute of VariableAccess has been deprecated. Use @Name instead.
  • pmd-plsql
    • ASTKEYWORD_UNRESERVED has been deprecated. This AST node was generated by mistake and is not used. The parser production has already been deprecated since 7.3.0.

✨️ Merged pull requests

  • #6923: [java] Fix #6882: New Rule: Enforce that local variables are declared at the start of their scope without initialization - Will-6543 (@Will-6543)
  • #6996: [java] Fix #6984: ExhaustiveSwitchHasDefault: list missing cases in the violation - Abdullah (@AzazelSensei)
  • #7048: [java] Deprecate getImage()/@Image and remove usages - Sören Glimm (@UncleOwen)
  • #7050: [html] Fix #5313: CPD end line without trailing newline - Eymen Onar (@Eymenonar)
  • #7055: [java] Fix #7054: Capture wildcard components of intersection bounds - benstpierre (@benstpierre)
  • #7059: [java] Fix #7014/#7015: InsecureCryptoIv/HardCodedCryptoKey: Detect default-initialized arrays - YukiAoto (@aoto-tech)
  • #7062: [java] Fix #7060: Fix constant classification of final variable references - YukiAoto (@aoto-tech)
  • #7066: [java] Fix #7063: CheckResultSet false positive with next() as ternary condition - Tanbir Hossain Ramim (@TanbirRamim)
  • #7067: [java] Fix #7018: UnusedAssignment false positive for assignment in condition operand - fudian (@fudianchn)
  • #7073: [core] Fix #7072: Reuse compiled violationSuppressXPath queries - YukiAoto (@aoto-tech)
  • #7087: [scala] chore: Add test for #2153 - Lukas Gräf (@lukasgraef)
  • #7088: [java] Fix #6903: Rewrite UseExplicitTypes as Java rule to support allowLongTypeNames - Andreas Dangel (@adangel)
  • #7094: [kotlin] Fix #7092: Add LooseCoupling rule - Peter Paul Bakker (@stokpop)
  • #7103: [java] UnnecessaryVarargsArrayCreation: add regression tests for #5069 - Yuriy Tumanov (@Eljees)
  • #7104: [java] Fix #5159: UnusedAssignment: an assert statement may not run - Yuriy Tumanov (@Eljees)
  • #7105: [java] Fix #4815: ExceptionAsFlowControl: stop at a lambda body - Yuriy Tumanov (@Eljees)
  • #7109: [java] Fix #5158: SingletonClassReturningNewInstance: a local holding the existing instance is not new - Yuriy Tumanov (@Eljees)
  • #7110: [groovy] Fix #7100: CPD fails on GStrings ending in an interpolated variable - anying (@anyingiit)
  • #7112: [doc] Use Markdown admonitions - Zbynek Konecny (@zbynek)
  • #7115: [plsql] Fix #6609: Parse parenthesized arithmetic comparisons - Burak Kalaycı (@kalayciburak)
  • #7118: [java] Fix #7117: ExceptionAsFlowControl: a throw in a lambda invoked by the method it is passed to - Yuriy Tumanov (@Eljees)
  • #7121: [java] Fix #7120: NonThreadSafeSingleton NoSuchElementException - Sören Glimm (@UncleOwen)
  • #7122: [java] Remove unused ctConstIfNotNull method from ASTExpression.ConstResult - Sören Glimm (@UncleOwen)
  • #7123: [core] Tokens: Add asserts - start of a location is never after the end of the location - Sören Glimm (@UncleOwen)
  • #7129: [java] Fix #7119: SimplifiableTestAssertion: Report more cases - Akhil-1527 (@Akhil-1527)
  • #7130: [core] Include XML validation details in ruleset loading errors - Noor Ahmadi (@noor-ahmadi)
  • #7131: [apex] Fix #5082: Allow “Schema.” in “EagerlyLoadedDescribeSObjectResult” - Marek Madejski (@TrangOul)
  • #7132: [java] Prepare deprecation of asCtx in java-errorprone (part of #4814) - Sören Glimm (@UncleOwen)
  • #7138: [java] Reset CPD constructor detection for each file - Noor Ahmadi (@noor-ahmadi)
  • #7139: [core] chore: Replace most of IOUtil with commons-io - Andreas Dangel (@adangel)
  • #7154: Fix line endings of mwnw.cmd - Sören Glimm (@UncleOwen)
  • #7157: [core] Fix #7156: Analysis cache fails with ZipException on invalid archive - Peter Paul Bakker (@stokpop)
  • #7158: [java] Fix #7145: void compatibility of parenthesized lambda bodies - Noor Ahmadi (@noor-ahmadi)
  • #7160: [java] Fix #7137: InvalidLogMessageFormat: handle unresolved exception type (incomplete auxclasspath) - Kaustubh Abhinand (@KaustAbhinand)
  • #7161: [java] Fix #7151: Apply the comb rule to unqualified method calls - sary (@saryn17)
  • #7162: [java] Fix #7150: type of numeric conditionals with byte, short or char operands - sary (@saryn17)
  • #7163: [java] Fix #7146, #7149: Loose invocation conversion and the most specific check for boxing - sary (@saryn17)
  • #7164: [java] Fix #7148: Allow boxing of lambda and method reference results in the strict phase - sary (@saryn17)
  • #7165: [kotlin] Suppress empty-list attribute values in tree dump tests - Peter Paul Bakker (@stokpop)
  • #7167: [html] Fix #7166: off-by-one error in LineNumbers.java - Sören Glimm (@UncleOwen)
  • #7169: chore: Ensure deprecated items are annotated with @Deprecated - Andreas Dangel (@adangel)
  • #7170: chore: Replace java.version with maven.compiler.release in pom files - Andreas Dangel (@adangel)
  • #7173: [tests] Remove flow control from tests - Zbynek Konecny (@zbynek)
  • #7177: [matlab] Fix #2258: Handle literal backslashes in character vectors - subotac (@subotac)
  • #7193: [java] Fix #6409: UnnecessaryCast false positive for anonymous class - Yang Bai (@ybai08)
  • #7199: [java] Fix #6546: Consolidate the Vector replacement rules - João Gabriel Alves Junior (@Gabrieljr42)
  • #7203: [java] Fix #4576: UseShortArrayInitializer false positive with arrays of parameterized types - markxu (@markjoin123)
  • #7219: [java] Fix #7213: UnusedPrivateMethod/UnusedPrivateField with qualified MethodSource/FieldSource references - leeshengis (@leeshengis)
  • #7224: [plsql] Fix #7223: Deprecate AST node ASTKEYWORD_UNRESERVED - Andreas Dangel (@adangel)
  • #7230: [core] Remove ShortFilenameUtil.java - Sören Glimm (@UncleOwen)
  • #7232: [core] Remove more unused code (FileFinder.java, FileExtensionFilter.java, PredicateUtil.getFileExtensionFilter()) - Sören Glimm (@UncleOwen)
  • #7259: [core] Don’t follow symlinks in FileCollector - Andreas Dangel (@adangel)
  • #7260: [core] HTMLRenderers: Properly escape rule name and externalInfoUrl - Andreas Dangel (@adangel)
  • #7261: [core] Disallow external entity expansions/DTD in XML parsing - Andreas Dangel (@adangel)
  • #7262: [core] Fix missing escaping in CSV renderers - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #7113: Bump PMD from 7.27.0 to 7.28.0
  • #7114: chore: Replace system-lambda with system-stubs
  • #7124: chore(deps): bump org.mockito:mockito-core from 5.23.0 to 5.24.0
  • #7125: chore(deps): bump org.apache.groovy:groovy from 5.1.2 to 5.1.3
  • #7126: chore(deps): bump ruby/setup-ruby from 1.324.0 to 1.327.0
  • #7127: chore(deps): bump org.apache.commons:commons-lang3 from 3.20.0 to 3.21.0
  • #7128: chore(deps): bump crate-ci/typos from 1.50.2 to 1.50.3
  • #7140: chore(deps): bump org.apache.maven:apache-maven from 3.9.16 to 3.10.0
  • #7141: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 6.2.0 to 6.3.1
  • #7142: chore(deps-dev): bump com.google.guava:guava from 33.7.1-jre to 33.7.2-jre
  • #7143: chore(deps): bump com.puppycrawl.tools:checkstyle from 14.1.0 to 14.3.0
  • #7159: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.26.2 to 0.26.3
  • #7185: chore(deps): bump ruby/setup-ruby from 1.327.0 to 1.328.0
  • #7186: chore(deps): bump crate-ci/typos from 1.50.3 to 1.51.1
  • #7187: chore(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2
  • #7188: chore(deps): bump actions/download-artifact from 8.0.1 to 8.0.2
  • #7189: chore(deps): bump org.ow2.asm:asm from 9.10.1 to 9.11
  • #7190: chore(deps): bump actions/setup-java from 6.0.1 to 6.1.0
  • #7205: chore(deps): bump org.ow2.asm:asm from 9.11 to 9.11.1
  • #7206: chore(deps): bump byte.buddy.version from 1.18.14 to 1.18.15
  • #7207: chore(deps): bump org.sonatype.central:central-publishing-maven-plugin from 0.11.0 to 0.12.0
  • #7208: chore(deps): bump io.github.apex-dev-tools:apex-parser from 5.2.0 to 5.3.0
  • #7209: chore(deps): bump ruby/setup-ruby from 1.328.0 to 1.329.0
  • #7210: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.26.3 to 0.26.5
  • #7212: chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.22.0 to 2.23.0
  • #7211: chore(deps): bump actions/create-github-app-token from 3.2.0 to 3.3.0
  • #7222: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 6.3.1 to 6.3.2
  • #7247: chore(deps): bump byte.buddy.version from 1.18.15 to 1.18.16
  • #7248: chore(deps): bump ruby/setup-ruby from 1.329.0 to 1.335.0
  • #7249: chore(deps): bump surefire.version from 3.6.0 to 3.6.1
  • #7250: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 6.3.2 to 6.4.0
  • #7251: chore(deps): bump com.google.code.gson:gson from 2.14.0 to 2.15.0

📈️ Stats

  • 91 commits
  • 95 closed tickets & PRs
  • Days since last release: 34

25-September-2026 - 7.28.0

The PMD team is pleased to announce PMD 7.28.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Kotlin XPath functions and type attributes
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Experimental API
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Kotlin XPath functions and type attributes

Type data is now accessible in XPath rules via new attributes and helper functions (see Kotlin XPath rule support):

  • Type-info Attributes: @TypeName, @ReturnTypeName, @AnnotationFqNames are exposed on declaration nodes (property, function, class, parameter, catch, for-loop, delegation specifier, annotation nodes). These attributes depend on type resolution: they are only available when auxClasspath is configured and the kotlin-type-mapper analysis has resolved the types.
  • General Attributes: @Mutable, @Identifier, @Name are exposed on declaration and import related nodes. These attributes don’t depend on type resolution, so they’re always present regardless of auxClasspath.
  • XPath functions:
    • pmd-kotlin:typeIs(typeName): matches if the node’s type is typeName or a subtype.
    • pmd-kotlin:typeIsExactly(typeName): matches the exact declared type only (no subtypes).
    • pmd-kotlin:hasAnnotation(name): matches if the node has an annotation with the given simple or FQN.
    • pmd-kotlin:modifiers(): returns the modifier keywords of a declaration as a sequence.
    • pmd-kotlin:isNullable(): returns true if the node’s declared type is nullable (has ?).
    • pmd-kotlin:hasUnresolvedReference(): returns true if the node contains an unresolved reference.
    • pmd-kotlin:matchesSig(signature): matches call sites by method signature pattern (supports wildcards).

🌟️ New and Changed Rules

New Rules

  • The new Java rule OnDemandImport reports on-demand imports, also known as wildcard imports. By default, static imports from JUnit and TestNG are allowed. The allowed static and type import packages can be configured with allowStaticImportsFrom and allowTypeImportsFrom.
  • The new Java rule LongLiteralEndingWithLowercaseL finds long literals ending with a lowercase l. That helps to avoid confusion between numbers ending with 1 and l. Uppercase L should be used to define long literals.
  • The new Java rule TypeNameMismatch finds types that are not defined in a .java file with the same name. Enforcing a match between source file name and type name makes it easier to find source code for given type.
  • The new Java rule CStyleArrayDeclaration finds C-style declarations of arrays (e.g. int numbers[]). That helps you use Java-style declarations (e.g. int[] numbers) consistently throughout the codebase.
  • The new Java rule InternalApiUsage reports usages of internal or test-only APIs (e.g. annotated with @VisibleForTesting, @TestOnly, @API(status=INTERNAL) or @ApiStatus.Internal) from code that shouldn’t depend on them.
  • The new Apex rule ApexUnitTestClassShouldHaveRunRelevantTestsAnnotation finds unit tests that do not use the new @IsTest(critical=true) or @IsTest(testFor='...') annotation parameters for tests. These parameters help to identify which tests should be executed during a RunRelevantTests deployment.
    Note: These annotation parameters are Beta and require Salesforce API 66.0+.

Changed Rules

  • The property checkNonStaticMethods of the rule NonThreadSafeSingleton is now deprecated and no longer has any effect. Its implementation did the opposite of what the documentation described. The rule now always reports both static and non-static methods; previously it reported only static methods by default.
    This may result in additional violations being reported.
    If you want to suppress violations for non-static methods, you can use suppression via XPath, e.g.
    <property name="violationSuppressXPath" value=".[ancestor-or-self::MethodDeclaration[1][@Static = false()]]" />
    
  • The property statementOrderMatters of the rule VariableCanBeInlined is now deprecated. Setting it to false relaxes the rule under the unsafe assumption that intervening statements have no side effects, which can lead to false positives. The property will be removed in PMD 8.0.0.

🐛️ Fixed Issues

  • apex-bestpractices
    • #6988: [apex] New rule: Detect usage of @IsTest(critical=true) / @IsTest(testFor=’…’) annotations (RunRelevantTests, Beta, API 66.0+)
  • core
    • #7013: [core] PMDConfiguration - “Can’t mix setClasspath with getAuxClasspath!”
  • cli
    • #7090: [cli] Add the missing exit code 5 to the CLI help
  • html
    • #6135: [html] HtmlCpdLexer giving IndexOutOfBoundsException when script contains unescaped closing tag
  • java
    • #6926: [java] IllegalArgumentException (Mismatched list sizes) with inconsistent unresolved generic arity
    • #7056: [java] Provide ability to disable auxClasspath warning added in 7.27.0
    • #7081: [java] NoSuchFileException when auxClasspath is given as a classpath file (file: URL) (since 7.27.0)
    • #7101: [java] ZipException when auxClasspath contains a non-jar file (since 7.27.0)
  • java-bestpractices
    • #5940: [java] UnusedAssignment: False positive when assignment is in conditional statement
    • #6901: [java] MethodReturnsInternalArray: Various false negatives with local aliases and conditional expressions
    • #7033: [java] New rule: TypeNameMismatch
    • #7047: [java] New rule: OnDemandImport
  • java-codestyle
    • #3124: [java] UnnecessaryLocalBeforeReturn/VariableCanBeInlined: deprecate property statementOrderMatters
    • #5732: [java] UnnecessaryCast false positive with package private methods
    • #7026: [java] New rule: CStyleArrayDeclaration
  • java-design
    • #6513: [java] SimplifyConditional: False negative when null check and instanceof are separated by other && conditions
    • #6694: [java] SimplifyBooleanReturns triggers inconsistently depending on redundant parentheses in return expression
    • #6889: [java] New rule: InternalApiUsage
  • java-documentation
    • #6450: [java] DanglingJavadoc: False positive on /// comments for Java < 23
  • java-errorprone
    • #1050: [java] NullAssignment: False positive inside if statement for first assignment
    • #6693: [java] CloneMethodMustImplementCloneable: False positive with throw-via-local
    • #7009: [java] ReplaceJavaUtilDate: False negative when using pattern matching
    • #7027: [java] New rule: LongLiteralEndingWithLowercaseL
    • #7068: [java] UnusedReturnValue: False positive for calls made on Mockito.verify(mock)
  • java-multithreading
    • #6297: [java] AvoidUsingVolatile: Update documentation
    • #6780: [java] NonThreadSafeSingleton: False negative with property checkNonStaticMethods
  • java-security
    • #7007: [java] HardCodedCryptoKey: False negative when a hard-coded key is constructed via new String(char[])
    • #7008: [java] HardCodedCryptoKey: False positive when the key comes from System.getProperty()
  • kotlin
    • #6893: [kotlin] Add XPath functions and type attributes
  • miscellaneous
    • #6961: [doc] When a rule’s description has a link to another rule in the exact wrong position, the doc generation crashes

🚨️ API Changes

Experimental API

  • kotlin
    • KotlinNodeTypeData: Provides the API to access type information on Kotlin AST nodes. It’s part of the new Kotlin type-aware analysis.
    • KotlinNodeTypeData.getTypeName(KotlinNode) and KotlinNodeTypeData.getReturnTypeName(KotlinNode) have been renamed to getType and getReturnType, and now return KotlinTypeName instead of String. The corresponding InternalApiBridge setters setTypeName/setReturnTypeName were renamed to setType/setReturnType the same way. This is a breaking change to this experimental API.
    • HasTypeName: Marker interface for Kotlin AST nodes that expose a @TypeName XPath attribute.
    • New XPath functions pmd-kotlin:typeIs, pmd-kotlin:typeIsExactly, pmd-kotlin:hasAnnotation, pmd-kotlin:modifiers, pmd-kotlin:matchesSig, pmd-kotlin:isNullable, pmd-kotlin:hasUnresolvedReference
    • New AST attribute view classes in package net.sourceforge.pmd.lang.kotlin.ast: KtCatchBlockAttributes, KtDelegationSpecifierAttributes, KtForStatementAttributes, KtFunctionValueParameterAttributes, KtPropertyDeclarationAttributes, KtSingleAnnotationAttributes, and KtUnescapedAnnotationAttributes.

✨️ Merged pull requests

  • #6864: [java] Fix #6780: NonThreadSafeSingleton checkNonStaticMethods contradicting impl - Subhadeep (@dweep-js)
  • #6885: [java] Fix #6693: CloneMethodMustImplementCloneable false positive for local-var throw - hexonal (@hexonal)
  • #6893: [kotlin] Add XPath functions and type attributes - Peter Paul Bakker (@stokpop)
  • #6922: [java] Fix #6694: Trigger SimplifyBooleanReturns when expressions require parentheses - Will-6543 (@Will-6543)
  • #6935: [java] Fix #6926: skip file on unresolved generic arity mismatch - Burak Kalaycı (@kalayciburak)
  • #6940: [java] Fix #6901: MethodReturnsInternalArray: Track internal array escapes through expressions - fudian (@fudianchn)
  • #6946: [java] Fix #6513: SimplifyConditional detects null check separated from instanceof by a && chain - fudian (@fudianchn)
  • #6951: [java] Fix #6450: DanglingJavadoc should ignore markdown javadoc (///) before Java 23 - fudian (@fudianchn)
  • #6963: [doc] Fix #6961: dont choke on cut off links - Sören Glimm (@UncleOwen)
  • #6975: [java] Prepare deprecation of asCtx in java-codestyle (part of #4814) - Sören Glimm (@UncleOwen)
  • #6991: [apex] Fix #6988: Add ApexUnitTestClassShouldHaveRunRelevantTestsAnnotation rule - Thomas Prouvot (@tprouvot)
  • #6992: [java] Fix #6297: Update AvoidUsingVolatile description - Sören Glimm (@UncleOwen)
  • #6993: [java] Fix #5732: UnnecessaryCast false positive for package-private members - Tanvir Alam (@tanvir-ux)
  • #6994: [java] New rule: InternalApiUsage - Zbynek Konecny (@zbynek)
  • #7005: [java] Fix rule reference from ProtectedMemberInFinalField to ProtectedMemberInFinalClass - Piotrek Żygieło (@pzygielo)
  • #7010: [java] Fix #7009: ReplaceJavaUtilDate/Calendar miss pattern variables and record components - renechoi (@renechoi)
  • #7011: [doc] chore: Improve RuleTagChecker to find invalid in-ruleset references - Andreas Dangel (@adangel)
  • #7012: [java] Fix #7008: HardCodedCryptoKey: False positive when a default value of System.getProperty() is treated as a hard-coded key - MakerYuichi (@MakerYuichi)
  • #7016: [java] Fix #5940: UnusedAssignment FP when constant operand short-circuits the condition - fudian (@fudianchn)
  • #7019: [core] Fix #7013: Only access PMDConfiguration.auxClasspath if it is actually set. - Sören Glimm (@UncleOwen)
  • #7025: [ci] gh-actions: Update environment variables for setup-java 6.0.0 - Sören Glimm (@UncleOwen)
  • #7028: [html] Fix #6135: HtmlCpdLexer giving IndexOutOfBoundsException when script contains unescaped closing tag - Lukas Gräf (@lukasgraef)
  • #7029: [java] Fix #7007: HardCodedCryptoKey detection for String(char[]) - suhanrain (@suhanrain)
  • #7030: [java] Fix #7027: New rule: LongLiteralEndingWithLowercaseL - Copilot (@Copilot)
  • #7031: [java] New rule: CStyleArrayDeclaration - Copilot (@Copilot)
  • #7032: [doc] Strip rule description when generating docs - Zbynek Konecny (@zbynek)
  • #7034: [java] New rule: TypeNameMismatch - Zbynek Konecny (@zbynek)
  • #7035: [java] Fix #1050: NullAssignment false positive inside if statement for first assignment - Lukas Gräf (@lukasgraef)
  • #7052: [java] New rule: OnDemandImport - suhanrain (@suhanrain)
  • #7061: [core] Fix off-by-one error in AbstractJjtreeNode.fitTokensToChildren() - Sören Glimm (@UncleOwen)
  • #7064: chore: Remove protobuf-java from - [Sören Glimm](https://github.com/UncleOwen) (@UncleOwen)
  • #7065: [java] Fix #3124: Deprecate statementOrderMatters property of VariableCanBeInlined - fudian (@fudianchn)
  • #7069: [java] Fix #7068: UnusedReturnValue false positive after Mockito.verify - Burak Kalaycı (@kalayciburak)
  • #7084: [java] Followup for #7008 (HardCodedCryptoKey): Fix FN when hard-coded fallback value is present - Lukas Gräf (@lukasgraef)
  • #7085: [java] Fix #7081: Exception when auxClasspath is a file URL - Andreas Dangel (@adangel)
  • #7086: [java] Fix #7056: Add JavaLanguageProperty to disable auxClasspath warnings - Andreas Dangel (@adangel)
  • #7089: [doc] TOC highlighting improvements - Zbynek Konecny (@zbynek)
  • #7090: [cli] Add the missing exit code 5 to the CLI help - Iain (@NotAFlightRisk)
  • #7102: [java] Fix #7101: Skip non-archive files on the auxclasspath - Burak Kalaycı (@kalayciburak)
  • #7106: [doc] Update release notes for 7.28.0 - Andreas Dangel (@adangel)
  • #7111: [doc] Add gradle environment vars example - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #5421: chore(deps): bump me.tongfei:progressbar from 0.9.5 to 0.10.2
  • #7004: Bump PMD from 7.26.0 to 7.27.0
  • #7021: chore(deps): bump org.apache.groovy:groovy from 5.1.0 to 5.1.1
  • #7022: chore(deps): bump crate-ci/typos from 1.49.0 to 1.50.0
  • #7023: chore(deps): bump actions/setup-java from 5.7.0 to 6.0.0
  • #7024: chore(deps): bump org.jsoup:jsoup from 1.23.1 to 1.23.2
  • #7037: chore(deps-dev): bump byte.buddy.version from 1.18.12 to 1.18.13
  • #7038: chore(deps-dev): bump org.projectlombok:lombok from 1.18.46 to 1.18.48
  • #7039: chore(deps-dev): bump ant.version from 1.10.17 to 1.10.18
  • #7040: chore(deps): bump surefire.version from 3.5.6 to 3.6.0
  • #7041: chore(deps): bump org.yaml:snakeyaml from 2.6 to 2.7
  • #7042: chore(deps-dev): bump io.github.git-commit-id:git-commit-id-maven-plugin from 10.0.0 to 10.0.1
  • #7043: chore(deps): bump com.puppycrawl.tools:checkstyle from 14.0.0 to 14.1.0
  • #7044: chore(deps): bump com.google.protobuf:protobuf-java from 4.36.0 to 4.36.1
  • #7045: chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.15.0 to 3.16.0
  • #7046: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.26.1 to 0.26.2
  • #7049: chore(deps): bump crate-ci/typos from 1.50.0 to 1.50.1
  • #7051: chore(deps): bump org.apache.groovy:groovy from 5.1.1 to 5.1.2
  • #7058: chore(deps-dev): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.7.0.6970 to 5.8.0.7211
  • #7074: chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.21.0 to 2.22.0
  • #7075: chore(deps-dev): bump org.apache.maven.plugins:maven-install-plugin from 3.1.4 to 3.2.0
  • #7076: chore(deps): bump scalameta.version from 4.17.3 to 4.17.4
  • #7077: chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.6.3 to 3.6.4
  • #7078: chore(deps): bump org.codehaus.mojo:extra-enforcer-rules from 1.12.0 to 1.12.1
  • #7079: chore(deps-dev): bump org.apache.maven.plugins:maven-deploy-plugin from 3.1.4 to 3.2.0
  • #7080: chore(deps): bump org.codehaus.mojo:build-helper-maven-plugin from 3.6.1 to 3.6.2
  • #7082: chore(deps): bump actions/setup-java from 6.0.0 to 6.0.1
  • #7096: chore(deps-dev): bump byte.buddy.version from 1.18.13 to 1.18.14
  • #7095: chore(deps): bump crate-ci/typos from 1.50.1 to 1.50.2
  • #7097: chore(deps): bump bigdecimal from 4.1.2 to 4.1.3 in /docs
  • #7098: chore(deps): bump ruby/setup-ruby from 1.321.0 to 1.324.0

📈️ Stats

  • 74 commits
  • 69 closed tickets & PRs
  • Days since last release: 27

28-August-2026 - 7.27.0

The PMD team is pleased to announce PMD 7.27.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Java 27 Support
    • Updated Apex Support
    • Kotlin type-aware analysis
  • 🌟️ New and Changed Rules
    • New Rules
    • Renamed Rules
    • Changed Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Deprecations
    • Experimental API
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Java 27 Support

This release of PMD brings support for Java 27.

There are no new standard language features.

There is one preview language feature:

  • JEP 532: Primitive Types in Patterns, instanceof, and switch (Fifth Preview)

In order to analyze a project with PMD that uses these preview language features, you’ll need to select the new language version 27-preview:

pmd check --use-version java-27-preview ...

Note: Support for Java 25 preview language features have been removed. The version “25-preview” is no longer available.

Updated Apex Support

The Apex language support has been bumped to version 67.0 (Summer ‘26). It supports the new Multiline String literals.

Kotlin type-aware analysis

Kotlin now supports type-aware analysis via the auxClasspath language property (see #6677). Resolved type names, return types, and annotation FQNs are available through KotlinNodeTypeData for use in Java-based rules.

Note: Type data is not yet accessible in XPath rules or the PMD Rule Designer. This will be added in the next version.

🌟️ New and Changed Rules

New Rules

  • The new java rule UnusedReturnValue (Java Error Prone) finds method calls whose result is not used, although ignoring the result of these method calls is likely a mistake.
    The rule is referenced in the quickstart.xml ruleset for Java.
  • New rule ProtectedMemberInFinalClass (Java Design) finds protected members defined in final classes. Such members should use package or private visibility to clarify their intended scope. The rule replaces now deprecated rules AvoidProtectedFieldInFinalClass and AvoidProtectedMethodInFinalClassNotExtending and flags members that were previously not detected by either of these rules, such as nested types or constructors.
    The rule is referenced in the quickstart.xml ruleset for Java.

Renamed Rules

  • The rule InstantiableUtilityClass (Java Design) was renamed from UseUtilityClass to better reflect the problem. The old name still works but is deprecated.

Changed Rules

  • The rule CommentRequired (Java Documentation) has a new property packageMethodCommentRequirement. It controls whether Javadoc comments are required (or unwanted) for package-private methods and constructors. Previously, only public and protected methods could be configured (via publicMethodCommentRequirement and protectedMethodCommentRequirement). The new property defaults to Ignored, so existing rule configurations are unaffected. This was implemented in #6880.
  • The rule BooleanGetMethodName (Java Codestyle) has a new property includeWrappedType. If set to true (default), the rule treats Boolean and boolean identical. If set to false, the rule follows the bean convention and treats Boolean like any other object.

Deprecated Rules

  • The java rule CheckSkipResult has been deprecated for removal in favor of the new rule UnusedReturnValue.
  • The java rule UselessPureMethodCall has been deprecated for removal in favor of the new rule UnusedReturnValue.

🐛️ Fixed Issues

  • apex
    • #6478: [apex] Parser error when using CALENDAR_YEAR() in SOQL
    • #6887: [apex] ParseException on Summer ‘26 multiline string literals (‘'’…’’’)
  • apex-bestpractices
    • #5904: [apex] ApexUnitTestShouldNotUseSeeAllDataTrue violation range should only be the annotation and not the entire test method
  • java
    • #5041: [java] Parsing failed in ParseLock#doParse(): IndexOutOfBoundsException
    • #6010: [java] java.lang.OutOfMemoryError: Java heap space when accessing big Jar files with PMD 7
    • #6374: [java] Support Java 27
    • #6768: [java] Disambiguation IllegalStateException resolving a synthesized record accessor used as a call argument alongside an anonymous class
    • #6932: [java] AssertionError when outer class is parsed before inner class with conflicting visibility
  • java-bestpractices
    • #1237: [java] AbstractClassWithoutAnyMethod: False positive for empty subclasses that inherit methods
    • #1287: [java] GuardLogStatement: False positive when using negative guard conditions
    • #2033: [jsp] NoClassAttribute: False positive for jsp:useBean
    • #5514: [java] ExhaustiveSwitchHasDefault: False positive for non-exhaustive switch statements
    • #5670: [java] ExhaustiveSwitchHasDefault: False positive with final fields not initialized in constructor
    • #6200: [java] UnusedAssignment: False positive about the ++ unary operator
    • #6393: [java] UnusedPrivateMethod: False positive with overloaded private methods called with values returned from methods of an unresolved type
    • #6611: [java] UnnecessaryVarargsArrayCreation: False positive when removing the array creates overload ambiguity
    • #6965: [java] AbstractClassWithoutAnyMethod: False Positive on derived abstract class
  • java-codestyle
    • #2974: [java] Merge rules about protected in final class (AvoidProtectedFieldInFinalClass, AvoidProtectedMethodInFinalClassNotExtending)
    • #5441: [java] UseDiamondOperator: False positive with interdependent generic vars
    • #6958: [java] BooleanGetMethodName should have the option to treat boolean wrapper type differently
    • #6274: [java] UselessParentheses: False positive in ternary else expression
    • #6651: [java] UnnecessaryImport: False positive when Javadoc {@link} references an array type
    • #6709: [java] LambdaCanBeMethodReference: False positive with array creation containing constructor call in receiver
    • #6737: [java] TooManyStaticImports: @SuppressWarnings(“PMD.TooManyStaticImports”) has stopped working
    • #6846: [java] VariableDeclarationUsageDistance: False positive with variables grouped at the top of a block
    • #6867: [java] UnnecessaryFullyQualifiedName: ContextedAssertionError: This should be unreachable: unknown constant ScopeInfo: MODULE_IMPORT
    • #6943: [java] UnnecessaryCast: False positives related to generics
  • java-design
    • #6714: [java] Rename UseUtilityClass to InstantiableUtilityClass
    • #6844: [java] AvoidThrowingNewInstanceOfSameException: message inconsistent with logic
    • #6881: [java] CognitiveComplexity does not count switch expressions
    • #6925: [java] ImmutableField: False positive on picocli annotated fields
  • java-documentation
    • #6270: [java] CommentSize: False positive with file header comments
    • #6880: [java] CommentRequired: add packageMethodCommentRequirement property
  • java-errorprone
    • #2840: [java] CloseResource: False positive on mocks
    • #3880: [java] ReturnEmptyCollectionRatherThanNull: False negative when a null value is assigned to a local that is later returned
    • #4623: [java] CloseResource: False positive with resource being closed in method
    • #6435: [java] UnconditionalIfStatement: False negative for negated boolean constant
    • #6537: [java] StaticEJBFieldShouldBeFinal: False Negative when using @Stateless etc.
    • #6547: [java] NonSerializableClass: False negative for generic element/value types of collections and maps
    • #6625: [java] New rule: UnusedReturnValue
    • #6695: [java] ReturnEmptyCollectionRatherThanNull: False negative when null is returned through a local variable
    • #6742: [java] CloseResource: False positive when a correctly-closed resource is declared without initializer
    • #6744: [java] ReturnEmptyCollectionRatherThanNull: False negatives when a returned expression can evaluate to null
    • #6826: [java] AssertEqualsArgumentOrder: False positive for double assertEquals
    • #6900: [java] DoubleCheckedLocking: False negative when the outer null check is written as !(x != null)
  • java-multithreading
    • #6747: [java] NonThreadSafeSingleton: False negative with ternary conditional operator
  • kotlin
    • #6795: [kotlin] Add kotlin-type-mapper infrastructure
    • #6891: [kotlin] AnnotationFqnAnnotator: @TypeName not set on UnescapedAnnotation nodes
  • miscellaneous
    • #1995: [core] PMD should display number of rules violated or errors found
    • #2527: [doc] CPD: Invalid link to String Tiling Algorithm
    • #4952: [doc] Improve doc around PMDConfiguration#prependAuxclasspath #setClassloader
    • #4953: [core] Deprecate PMDConfiguration#setClassloader and #getClassloader
    • #6837: [ci] chore: actions/create-github-app-token: Input ‘app-id’ has been deprecated with message: Use ‘client-id’ instead
    • #6865: [core] Include the running PMD version in the “Unable to find referenced rule” error
    • #6913: [core] RuleSetLoader#loadFromString ignores previously configured Resource/ClassLoader
    • #6952: [core] Ruleset references are not resolved relative to the referencing ruleset

🚨️ API Changes

Deprecations

  • core
    • PMDConfiguration#getClassLoader and PMDConfiguration#setClassLoader are deprecated. Use prependAuxClasspath or setAuxClasspath to configure the auxClasspath for analyzing Java code.
      Note: In order to read back the currently configured auxClasspath, use getAuxClasspath and not the deprecated getClassLoader() anymore.
      Using ClassLoaders directly is discouraged, as it is unclear, if and when the ClassLoaders should be closed to release their resources. By just configuring the auxClasspath, PMD internally can deal with that.
  • core
    • net.sourceforge.pmd.lang.JvmLanguagePropertyBundle.setClassLoader and net.sourceforge.pmd.lang.JvmLanguagePropertyBundle.getAnalysisClassLoader are deprecated. Use the language property JvmLanguagePropertyBundle#AUX_CLASSPATH instead via getProperty() and setProperty(). This language property is now set correctly when providing the auxClasspath via CLI parameter --aux-classpath.
    • The internal class net.sourceforge.pmd.internal.util.ClasspathClassLoader has been explicitly marked as deprecated. Using ClassLoaders directly is discouraged. Use PMDConfiguration#setAuxClasspath instead.
  • java
    • TypeSystem#usingClassLoaderClasspath is deprecated. Using ClassLoaders directly is discouraged. Use usingClasspath instead.

Experimental API

  • core
    • The new AuxClasspathLoader is a replacement for the deprecated ClasspathClassLoader. It deals with a typical classpath to load classes need for Java’s type resolution. It has the static method enableReuse(int) which enables caching of AuxClasspathLoader instances. This is useful for unit tests or IDE plugins, when PMD is executed multiple times within one JVM instance. Don’t forget to call disableReuse() when you’re done to close all cached instances.
  • kotlin
    • KotlinNodeTypeData: Provides the initial API to access type information on Kotlin AST nodes. It’s part of the new Kotlin type-aware analysis.

✨️ Merged pull requests

  • #6795: [kotlin] Add kotlin-type-mapper infrastructure - Peter Paul Bakker (@stokpop)
  • #6811: [java] Fix #4623: CloseResource: False positive with resource being closed in method - Lukas Gräf (@lukasgraef)
  • #6822: [java] Fix #5670, #5514: ExhaustiveSwitchHasDefault when default is necessary - Sören Glimm (@UncleOwen)
  • #6823: [cli] Print PMD analysis summary - DragonFSKY (@DragonFSKY)
  • #6825: [doc] Update “Merging pull requests” - Sören Glimm (@UncleOwen)
  • #6827: [java] Fix #6826: AssertEqualsArgumentOrder false positive for double/float delta - Dan Halperin (@dhalperi)
  • #6828: [java] Fix #6709: Fix false positive: LambdaCanBeMethodReference should not flag lambda… - Subhadeep (@dweep-js)
  • #6829: [core] test: cover pmd analysis configuration - amir (@amirdeljouyi)
  • #6838: [java] Follow-up on #6809: Add tests - Sören Glimm (@UncleOwen)
  • #6840: chore: Fix #6837: Use client id for create-github-app-token - Andreas Dangel (@adangel)
  • #6841: [core] refactor: AnalysisCache based on Path - Andreas Dangel (@adangel)
  • #6842: [java] #4730: Add a test for FinalFieldCouldBeStatic that shows that #4730 was already fixed - Sören Glimm (@UncleOwen)
  • #6843: [java] Fix #6714: Rename UseUtilityClass to InstantiableUtilityClass - Sören Glimm (@UncleOwen)
  • #6845: [core] Fix #4953: Deprecate PMDConfiguration#getClassLoader - Andreas Dangel (@adangel)
  • #6858: [java] Fix AvoidThrowingNewInstanceOfSameException false positive - Subhadeep (@dweep-js)
  • #6859: [java] Fix #6010: Add replacement for ClasspathClassloader - Andreas Dangel (@adangel)
  • #6860: [java] Fix #6846: VariableDeclarationUsageDistance: False positive with variables grouped at the top of a block - Gamja-rani (@onetuks)
  • #6863: [java] chore: Add test for ReportStatsListener - Sören Glimm (@UncleOwen)
  • #6866: [java] Fix #5041: IndexOutOfBoundsException for type annotations on inner class method signatures - Niklas Keller (@kelunik)
  • #6868: [java] Fix #6867: Handle module imports in UnnecessaryFullyQualifiedName - DragonFSKY (@DragonFSKY)
  • #6870: [core] Fix #6865: Improve missing rule reference error - DragonFSKY (@DragonFSKY)
  • #6871: [java] Fix #6768: Resolve record component types before inference - DragonFSKY (@DragonFSKY)
  • #6880: [java] CommentRequired: add packageMethodCommentRequirement property - legacynode (@legacynode)
  • #6883: [java] CognitiveComplexity: count switch expressions - Kurath (@KurathSec)
  • #6884: [java] Fix #6651: UnnecessaryImport: False positive for array-typed Javadoc {@link} parameters - hexonal (@hexonal)
  • #6886: [doc] chore: release_notes - Use 4 space indentation - Andreas Dangel (@adangel)
  • #6892: [kotlin] Fix #6891: Use KtModifiers container in AnnotationFqnAnnotator - Peter Paul Bakker (@stokpop)
  • #6894: [java] Support Java 27 - Andreas Dangel (@adangel)
  • #6902: [java] Fix #6737: Use next annotatable sibling for supressing top level - Andreas Dangel (@adangel)
  • #6905: Fix Regression-Tester config: Replace Schedul-o-matic-9000 with declarative-lookup-rollup-summaries - Sören Glimm (@UncleOwen)
  • #6906: [jsp] Fix #2033: NoClassAttribute for jsp:useBean - Columbus Labs (@ColumbusLabs)
  • #6916: [java] Fix #6625: New rule: UnusedReturnValue - Sören Glimm (@UncleOwen)
  • #6917: [java] Fix #6900: Modifies isNullCheck to accept negated expressions - Will-6543 (@Will-6543)
  • #6918: [java] Fix #6742: CloseResource false positive for a wrapped resource assigned without an initializer - Eljees (@Eljees)
  • #6919: [java] Prepare deprecation of asCtx in java-bestpractices (part of #4814) - Sören Glimm (@UncleOwen)
  • #6920: [java] Fix #1287: GuardLogStatement false positive with a guard clause - Eljees (@Eljees)
  • #6921: [core] Fix #6913: Use the configured class loader in RuleSetLoader#loadFromString - renechoi (@renechoi)
  • #6933: [java] Fix #6932: Handle conflicting inner class visibility modifiers - Scrates1 (@Scrates1)
  • #6934: [java] Fix #5441: Resolve interdependent inference variables simultaneously - Sebastian Lövdahl (@slovdahl)
  • #6936: [java] Fix #6925: ImmutableField: false positive on picocli @Option/@Parameters fields - dev_Hakaze (@arimu1)
  • #6938: [java] Fix #6747: NonThreadSafeSingleton flags ternary lazy init - fudian (@fudianchn)
  • #6939: [java] Fix #6435: UnconditionalIfStatement flags arbitrarily negated boolean literals - fudian (@fudianchn)
  • #6941: [java] Fix #6744: ReturnEmptyCollectionRatherThanNull: Analyze possible null return values - fudian (@fudianchn)
  • #6942: [java] Fix #6547: NonSerializableClass checks collection/map generic element types - fudian (@fudianchn)
  • #6944: chore: Remove unnecessary casts - Sören Glimm (@UncleOwen)
  • #6945: [java] Fix #6537: StaticEJBFieldShouldBeFinal detects @Stateless/@Stateful/@Singleton/@MessageDriven EJB classes - fudian (@fudianchn)
  • #6947: [java] Fix #6393: UnusedPrivateMethod FP on overloaded methods when overload resolution fails - fudian (@fudianchn)
  • #6948: [java] Fix #6270: CommentSize skips file header comments - fudian (@fudianchn)
  • #6949: [java] Fix #6611: UnnecessaryVarargsArrayCreation ignores overload ambiguity - fudian (@fudianchn)
  • #6950: [java] Fix #6274: UselessParentheses treats ternary else-branch parentheses as clarifying - fudian (@fudianchn)
  • #6953: [core] Fix #6952: Resolve ruleset references relative to the referencing ruleset - Lukas Gräf (@lukasgraef)
  • #6954: [java] Fix #2840: CloseResource: allow Mockito mocks by default - Eljees (@Eljees)
  • #6955: [apex] Fix ApexUnitTestShouldNotUseSeeAllDataTrue violation location - Taran (@tarann26)
  • #6957: [java] Fix dataflow state for conditional initializers - subotac (@subotac)
  • #6959: [chore] Add oout to allowed list of typos - Sören Glimm (@UncleOwen)
  • #6962: [java] Fix #6958: Add configurable Boolean handling to BooleanGetMethodName - Harshit Sinha (@harshitsinha11)
  • #6964: [java] New rule: ProtectedMemberInFinalClass - Zbynek Konecny (@zbynek)
  • #6966: [java] AssertEqualsArgumentOrder: False negative for assertEquals with delta - Zbynek Konecny (@zbynek)
  • #6968: [java] Fix #6967: Make violation message of UnusedReturnValue consistent by removing type parameters - Sören Glimm (@UncleOwen)
  • #6972: [java] Fix #6965: AbstractClassWithoutAnyMethod false positive on derived abstract class - Abdullah (@AzazelSensei)
  • #6973: chore: Enforce bytecode version JDK 8 - Andreas Dangel (@adangel)
  • #6974: [java] Introduce JPackageSymbol - Andreas Dangel (@adangel)
  • #6976: chore: Fix AssertEqualsArgumentOrder - Andreas Dangel (@adangel)
  • #6978: [java] UnusedReturnValue: Fix description - Sören Glimm (@UncleOwen)
  • #6981: [doc] Fix #2527: restore CPD tiling article link - Abdullah (@AzazelSensei)
  • #6982: [java] Fix #6943: UnnecessaryCast: false positives related to generics - dev_Hakaze (@arimu1)
  • #6989: [doc] Update release notes for 7.27.0 - Andreas Dangel (@adangel)
  • #6990: [java] Move ProtectedMemberInFinalClass to design category - Zbynek Konecny (@zbynek)

📦️ Dependency updates

  • #6824: Bump PMD from 7.25.0 to 7.26.0
  • #6830: chore(deps): bump actions/setup-java from 5.3.0 to 5.4.0
  • #6831: chore(deps): bump junit.version from 6.1.0 to 6.1.1
  • #6832: chore(deps): bump actions/cache from 6.0.0 to 6.1.0
  • #6833: chore(deps): bump actions/cache/restore from 6.0.0 to 6.1.0
  • #6834: chore(deps): bump ruby/setup-ruby from 1.314.0 to 1.315.0
  • #6835: chore(deps): bump crate-ci/typos from 1.47.2 to 1.48.0
  • #6836: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.6.0 to 13.7.0
  • #6847: chore(deps): bump marocchino/sticky-pull-request-comment from 3.0.4 to 3.0.5
  • #6848: chore(deps): bump actions/setup-java from 5.4.0 to 5.5.0
  • #6849: chore(deps): bump ruby/setup-ruby from 1.315.0 to 1.316.0
  • #6850: chore(deps): bump scalameta.version from 4.17.0 to 4.17.1
  • #6851: chore(deps): bump io.github.apex-dev-tools:vf-parser from 2.0.0-beta.1 to 2.0.0
  • #6852: chore(deps-dev): bump log4j.version from 2.26.0 to 2.26.1
  • #6854: chore(deps): bump org.apache.groovy:groovy from 5.0.6 to 5.0.7
  • #6855: chore(deps-dev): bump byte.buddy.version from 1.18.10 to 1.18.11
  • #6857: chore(deps): bump org.checkerframework:checker-qual from 4.2.0 to 4.2.1
  • #6862: [apex] Fix #6478: Bump apex-parser from 5.0.0 to 5.1.0
  • #6872: chore: Bump maven from 3.9.14 to 3.9.16
  • #6873: chore(deps): bump net.sf.saxon:Saxon-HE from 12.9 to 12.10
  • #6874: chore(deps): bump ruby/setup-ruby from 1.316.0 to 1.318.0
  • #6875: chore(deps): bump scalameta.version from 4.17.1 to 4.17.2
  • #6876: chore(deps): bump junit.version from 6.1.1 to 6.1.2
  • #6878: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.7.0 to 13.8.0
  • #6890: [apex][visualforce] Update apex-ls from 6.0.2 to 6.1.0
  • #6897: chore(deps): bump ruby/setup-ruby from 1.318.0 to 1.320.0
  • #6898: chore(deps): bump actions/checkout from 7.0.0 to 7.0.1
  • #6899: chore(deps): bump actions/setup-java from 5.5.0 to 5.6.0
  • #6907: chore(deps): bump ruby/setup-ruby from 1.320.0 to 1.321.0
  • #6908: chore(deps): bump scalameta.version from 4.17.2 to 4.17.3
  • #6909: chore(deps): bump csv from 3.3.5 to 3.3.6 in /docs
  • #6910: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.8.0 to 13.10.0
  • #6911: chore(deps): bump org.apache.maven.plugins:maven-jar-plugin from 3.5.0 to 3.5.1
  • #6927: chore(deps): bump org.jsoup:jsoup from 1.22.2 to 1.23.1
  • #6928: chore(deps): bump org.cyclonedx:cyclonedx-maven-plugin from 2.9.2 to 2.9.3
  • #6929: chore(deps): bump actions/setup-java from 5.6.0 to 5.7.0
  • #6930: chore(deps): bump org.apache.groovy:groovy from 5.0.7 to 5.0.8
  • #6931: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 6.1.0 to 6.2.0
  • #6969: chore(deps): bump junit.version from 6.1.2 to 6.1.3
  • #6970: chore(deps): bump crate-ci/typos from 1.48.0 to 1.49.0
  • #6971: chore(deps): bump org.checkerframework:checker-qual from 4.2.1 to 4.2.2
  • #6979: chore(deps): bump build-tools from 39 to 40
  • #6980: chore(deps): bump json from 2.19.2 to 2.19.9 in /docs
  • #6985: chore(deps-dev): bump com.google.guava:guava from 33.6.0-jre to 33.7.1-jre
  • #6986: chore(deps): bump org.apache.groovy:groovy from 5.0.8 to 5.1.0
  • #6997: chore(deps): bump com.google.protobuf:protobuf-java from 4.35.1 to 4.36.0
  • #6998: chore(deps-dev): bump byte.buddy.version from 1.18.11 to 1.18.12
  • #6999: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.10.0 to 14.0.0
  • #7001: chore(deps): bump io.github.apex-dev-tools:apex-parser from 5.1.0 to 5.2.0

📈️ Stats

  • 120 commits
  • 124 closed tickets & PRs
  • Days since last release: 60

29-June-2026 - 7.26.0

The PMD team is pleased to announce PMD 7.26.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Swift Changes
    • Updated PMD Designer
  • 🌟️ New and Changed Rules
    • New Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Swift Changes

The Swift parser now forwards syntax errors as usual processing errors. Before it just logged any errors and tried to move on, resulting in an incomplete AST with error nodes. As part of this change, the grammar has been slightly improved around macro declarations, generic parameters and parameter packs.
This means that PMD might fail now on Swift files with processing errors, when it previously ran without obvious problems. The Swift module in PMD now behaves like other modules in regard to error handling.

Updated PMD Designer

This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog (7.19.3).

🌟️ New and Changed Rules

New Rules

  • The new Java rule WrongTestAnnotation detects when test annotations from the wrong testing framework (JUnit 4, JUnit Jupiter, or TestNG) are used in your code, preventing tests from being silently skipped due to framework mismatches. This helps avoid the silent failure where tests compile but don’t execute because the test runner doesn’t recognize the annotation.
  • The new Java rule AssertEqualsArgumentOrder detects assertions where the expected and actual arguments were swapped. This helps find assertions that are producing a confusing error message when they fail.
  • The new Kotlin rule LocalVariableShadowsParameter detects local variable declarations that use the same name as a parameter of the enclosing function. This shadows the parameter and may lead to confusion about which value is used.
  • The new Apex rule InvocableClassNoArgConstructor detects classes that use @InvocableVariable properties, but that don’t provide a no-arg constructor. Without such a constructor, runtime exception occur when Salesforce Flow tries to instantiate such classes.

Deprecated Rules

  • The rule UseObjectForClearerAPI was deprecated. Use ExcessiveParameterList instead. The old rule name still works.

🐛️ Fixed Issues

  • apex
    • #6806: [apex] ANTLR runtime mismatch 4.9.1 used for code generation does not match the current runtime version 4.13.2
  • apex-errorprone
    • #6793: [apex] New Rule: Invocable Classes require a no argument constructor
  • apex-security
    • #2955: [apex] ApexSOQLInjection: False positive when passing local var with concatenating strings
    • #3877: [apex] ApexCRUDViolation: False positive with Lists of Objects with getSObjectType().getDescribe()
  • core
    • #6764: [core] ANTLR: Report syntax errors as processing errors
  • cpp
    • #6641: [cpp]: IndexOutOfBoundsException in CPD when a duplication is at end of file with UTF8-BOM
  • cli
    • #6741: [cli] Designer: Fix quotes in PMD_OPENJFX_MODULE_PATH setting
  • java
    • #6812: [java] Rename ASTMethodDeclaration#isOverridden() to isOverride()
  • java-bestpractices
    • #6627: [java] UnusedPrivateMethod: could not handle javax.annotation
    • #6692: [java] ForLoopCanBeForeach: inconsistent detection between i += 1 and i = i + 1 update forms
    • #6736: [java] JUnitJupiterTestShouldBePackagePrivate: False negative when the only tests are in a @Nested class
    • #6782: [java] UseStandardCharsets: ArrayIndexOutOfBoundsException in line 81
  • java-codestyle
    • #6239: [java] UseDiamondOperator: False positive with Guice TypeLiteral
    • #6775: [java] UselessParentheses: False negative when on the right-hand side of an assignment statement
  • java-design
    • #3741: [java] Deprecate UseObjectForClearerAPI
    • #6459: [java] PublicMemberInNonPublicType: False positive for main(…) methods
    • #6460: [java] PublicMemberInNonPublicType: False negative for overridden methods
    • #6814: [java] AvoidDeepNestedIfStmts: count ifs properly in else branch
  • java-errorprone
    • #2846: [java] New Rule: WrongTestAnnotation
    • #5011: [java] TestClassWithoutTestCases: False positive for test classes extending a class with tests (in nested classes)
    • #6743: [java] CloseResource: False positive for closeable initialized with (T) null
    • #6781: [java] UselessPureMethodCall: False positive for Stream.forEach
  • java-performance
    • #6740: [java] OptimizableToArrayCall: False positive when new T[0x0] is used instead of new T[0]
  • kotlin
    • #6677: [kotlin] Add auxClasspath language property
  • kotlin-bestpractices
    • #6732: [kotlin] New Rule: LocalVariableShadowsParameter
  • swift
    • #6801: [swift] Report syntax errors as processing errors

🚨️ API Changes

  • core
    • AntlrBaseParser has been deprecated in favor of AntlrBaseParserWithErrorHandling, which converts ANTLR’s parsing errors into PMD’s processing errors by default.
  • java
    • ASTMethodDeclaration#isOverridden has been renamed to isOverride. The old name has been deprecated and will remain available until PMD 8.
      The corresponding XPath attribute @Overridden is deprecated as well. Use @Override instead.

✨️ Merged pull requests

  • #6678: [kotlin] Fix #6677: Add auxClasspath language property - Peter Paul Bakker (@stokpop)
  • #6703: [cpp] Fix #6641: CPD: IndexOutOfBoundsException when a duplication is at end of file with UTF8-BOM - Lukas Gräf (@lukasgraef)
  • #6713: [java] New rule: AssertEqualsArgumentOrder - Zbynek Konecny (@zbynek)
  • #6727: [java] Fix #6692: ForLoopCanBeForeach detect i = i + 1 update form - hyeonjune (@qwerty7878)
  • #6728: chore: Fix pmd test setup - Andreas Dangel (@adangel)
  • #6730: [core] RuleSetWriter: fix indent-number attribute - Andreas Dangel (@adangel)
  • #6733: [kotlin] Fix #6732: Add LocalVariableShadowsParameter rule - Peter Paul Bakker (@stokpop)
  • #6735: [java] Fix #2846: New Rule: WrongTestAnnotation - Sören Glimm (@UncleOwen)
  • #6738: [java] Fix #6736: Add JTypeMirror.streamClasses() - Sören Glimm (@UncleOwen)
  • #6741: [cli] Designer: Fix quotes in PMD_OPENJFX_MODULE_PATH setting - Philip Graf (@acanda)
  • #6745: [java] Fix #6239: UseDiamondOperator: Implement heuristic for Super Type Token Pattern - Sören Glimm (@UncleOwen)
  • #6748: [java] Fix #6743: CloseResource: False positive for closeable initialized with (T) null - Lukas Gräf (@lukasgraef)
  • #6761: chore: Fix PMD issues from new dogfood rules - Andreas Dangel (@adangel)
  • #6763: [doc] Split old release notes page - Andreas Dangel (@adangel)
  • #6764: [core] ANTLR: Report syntax errors as processing errors - Andreas Dangel (@adangel)
  • #6765: [apex] Fix #2955: ApexSOQLInjection: False positive when concatenating strings - Lukas Gräf (@lukasgraef)
  • #6767: [chore] #6641: Remove comment from test-data to reproduce original issue - Lukas Gräf (@lukasgraef)
  • #6769: [apex] Fix #3877: ApexCRUDViolation false positive on Lists of Objects with getSObjectType().getDescribe() - Lukman Hakim (@lukman48)
  • #6776: [java] Fix #6775: UselessParentheses: not reported on the right-hand side of an as… - Subhadeep (@dweep-js)
  • #6777: [chore] #6641: Further improve the test - Andreas Dangel (@adangel)
  • #6778: [java] Fix examples in javadocs for InvocationMatcher - Sören Glimm (@UncleOwen)
  • #6779: [java] Fix #3741: Deprecate UseObjectForClearerApi - Sören Glimm (@UncleOwen)
  • #6783: [java] Fix #6782: Add missing check for varargs - Sören Glimm (@UncleOwen)
  • #6791: chore: Keep .ci/tools/typos.sh version in sync with github actions - Andreas Dangel (@adangel)
  • #6792: [ci] chore: Improve publish-release job dependencies - Andreas Dangel (@adangel)
  • #6794: [apex] New rule: InvocableClassNoArgConstructor - Daniel Ballinger (@FishOfPrey)
  • #6796: [java] Fix #6460: Fix false negative for overridden methods in PublicMemberInNonPublicType - Sören Glimm (@UncleOwen)
  • #6797: [java] Fix #6781: False positive in UselessPureMethodCall with unresolved types - Zbynek Konecny (@zbynek)
  • #6801: [swift] Report syntax errors as processing errors - Andreas Dangel (@adangel)
  • #6802: [java] #6461: PublicMemberInNonPublicType: Verify that we can suppress on the method - Sören Glimm (@UncleOwen)
  • #6803: [chore] git-commit-id-maven-plugin: Use native git - Sören Glimm (@UncleOwen)
  • #6804: [java] Fix #6459: special case main in PublicMemberInNonPublicType - Sören Glimm (@UncleOwen)
  • #6805: [java] #4960: Add regression test for UnusedAssignment - Sören Glimm (@UncleOwen)
  • #6807: [apex] Fix #6806: Upgrade vf-parser to 2.0.0-beta.1 - Andreas Dangel (@adangel)
  • #6809: [java] Fix #5011: Fix FP in TestClassWithoutTestCases when the only tests are in a superclass - Sören Glimm (@UncleOwen)
  • #6812: [java] Rename ASTMethodDeclaration#isOverridden() to isOverride() - Sören Glimm (@UncleOwen)
  • #6813: [java] Fix #6740: Fix FP in OptimizableToArrayCall - Sören Glimm (@UncleOwen)
  • #6814: [java] AvoidDeepNestedIfStmts: count ifs properly in else branch - Zbynek Konecny (@zbynek)
  • #6821: [java] Fix #6627: UnusedPrivateMethod: add javax to ignored annotations - Sören Glimm (@UncleOwen)

📦️ Dependency updates

  • #6734: Bump PMD from 7.24.0 to 7.25.0
  • #6739: chore: Remove maven-shade-plugin from
  • #6751: chore(deps): bump crate-ci/typos from 1.46.3 to 1.47.2
  • #6752: chore(deps): bump actions/checkout from 6.0.2 to 6.0.3
  • #6754: chore(deps): bump org.checkerframework:checker-qual from 4.1.0 to 4.2.0
  • #6755: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.8 to 1.18.10
  • #6756: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.4.2 to 13.5.0
  • #6757: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.8 to 1.18.10
  • #6758: chore(deps): bump org.apache.maven.plugins:maven-dependency-plugin from 3.10.0 to 3.11.0
  • #6759: chore(deps): bump surefire.version from 3.5.5 to 3.5.6
  • #6760: chore: Keep versions of byte-buddy and byte-buddy-agent in sync
  • #6762: Bump build-tools from 38 to 39
  • #6770: chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.14 to 0.8.15
  • #6771: chore(deps): bump ruby/setup-ruby from 1.310.0 to 1.312.0
  • #6772: chore(deps-dev): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.6.0.6792 to 5.7.0.6970
  • #6773: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.26.0 to 0.26.1
  • #6784: chore(deps): bump actions/setup-java from 5.2.0 to 5.3.0
  • #6785: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.5.0 to 13.6.0
  • #6786: chore(deps): bump ruby/setup-ruby from 1.312.0 to 1.313.0
  • #6787: chore(deps): bump com.google.protobuf:protobuf-java from 4.35.0 to 4.35.1
  • #6788: chore(deps): bump org.sonatype.central:central-publishing-maven-plugin from 0.10.0 to 0.11.0
  • #6789: chore(deps-dev): bump tmp from 0.2.6 to 0.2.7
  • #6798: chore(deps): bump concurrent-ruby from 1.3.6 to 1.3.7 in /docs
  • #6799: chore(deps): bump concurrent-ruby from 1.3.6 to 1.3.7 in /.ci/files
  • #6800: chore(deps): bump nokogiri from 1.19.3 to 1.19.4 in /.ci/files
  • #6810: Update Designer to 7.19.3
  • #6815: chore(deps): bump actions/checkout from 6.0.3 to 7.0.0
  • #6816: chore(deps): bump actions/cache from 5.0.5 to 6.0.0
  • #6817: chore(deps): bump ruby/setup-ruby from 1.313.0 to 1.314.0
  • #6819: chore(deps): bump org.cyclonedx:cyclonedx-maven-plugin from 2.9.1 to 2.9.2
  • #6820: chore(deps-dev): bump commons-logging:commons-logging from 1.3.6 to 1.4.0

📈️ Stats

  • 151 commits
  • 60 closed tickets & PRs
  • Days since last release: 31

29-May-2026 - 7.25.0

The PMD team is pleased to announce PMD 7.25.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Updated ANTLR library to 4.13.2
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
    • Renamed rules and properties
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Deprecations
    • Experimental API
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ 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.

🌟️ New and Changed Rules

New Rules

  • The new Java rule JUnitJupiterTestNoPrivateModifier find JUnit test classes and methods that are private. Test classes, test methods, and lifecycle methods are not required to be public, but they must not be private. Otherwise, they won’t be found by the test framework.
  • The new Java rule UnnecessaryBlock reports blocks that are unnecessary as they don’t introduce a new scope. This rule helps simplify code structure by identifying and flagging redundant blocks that can make code harder to read and may be misleading.
  • The new Java rule VariableDeclarationUsageDistance flags local variables that are declared far from their usage, which can make code harder to read. The rule has a property maxDistance that allows to configure the maximum allowed distance between declaration and usage.
  • The new Java rule AssertStatementInTest detects usages of assert statement in tests. These should be replaced by framework assertion methods such as assertEquals. Such methods provide better error messages and make test behave correctly when running without -ea.

Changed Rules

  • The rule OnlyOneReturn has a new property allowGuardIfs. When this property is true, then guard ifs at the beginning of a method are allowed their return statements don’t count.
  • The rules UseUtilityClass and ClassNamingConventions now use the same definition of what a utility class is. The most significant change is, that classes with main() methods are no longer considered utility classes by UseUtilityClass.
  • We are continuously working to improve the precision of violation reporting for various rules. The goal is to ensure that rules report issues on the correct line and highlight only the relevant lines. For example, instead of flagging an entire class declaration (including its body), we now generally report only the class name. For more details, see [java] Single Line Warnings #730 and [java] Review reported locations of rules #3769. While this effort is still ongoing, the following Java rules have been updated in this release:
    • AbstractClassWithoutAbstractMethod
    • AbstractClassWithoutAnyMethod
    • AtLeastOneConstructor
    • AvoidDollarSigns
    • AvoidCatchingGenericException
    • AvoidSynchronizedStatement (now reports only on synchronized keyword and not the whole synchronized block)
    • ClassNamingConventions
    • ClassWithOnlyPrivateConstructorsShouldBeFinal
    • CommentDefaultAccessModifier
    • CommentRequired
    • CouplingBetweenObjects (now reports only on class identifier and not whole compilation unit anymore)
    • CyclomaticComplexity
    • DataClass
    • ExcessiveImports (now reports only on imports and not the whole compilation unit anymore)
    • ExcessiveParameterList
    • ExcessivePublicCount
    • ExhaustiveSwitchHasDefault (now reports only on switch keyword and not the whole switch block)
    • GodClass
    • ImplicitFunctionalInterface
    • JUnit5TestShouldBePackagePrivate
    • LocalHomeNamingConvention
    • LocalInterfaceSessionNamingConvention
    • MissingSerialVersionUID
    • MissingStaticMethodInNonInstantiatableClass
    • NcssCount
    • NonExhaustiveSwitch (now reports only on switch keyword and not the whole switch block)
    • NoPackage
    • PublicMemberInNonPublicType
    • ShortClassName
    • SingleMethodSingleton
    • SwitchDensity (now reports only on switch keyword and not the whole switch block)
    • TestClassWithoutTestCases
    • TooFewBranchesForSwitch (now reports only on switch keyword and not the whole switch block)
    • TooManyFields (now reports only on class identifier and not the whole class body anymore)
    • TooManyMethods (now reports only on class identifier and not the whole class body anymore)
    • TooManyStaticImports (now reports only on the first static import and not the whole compilation unit anymore)
    • UnnecessaryModifier
    • UseUtilityClass

Renamed rules and properties

  • One rule and one property have been renamed to reflect the fact that they work for both JUnit 5 and 6:
    • The rule JUnitJupiterTestShouldBePackagePrivate (Java Best Practices) was renamed from JUnit5TestShouldBePackagePrivate.
    • The property junitJupiterTestPattern of rule MethodNamingConventions (Java Code Style) was renamed from junit5TestPattern.

The old names still work but are deprecated.

🐛️ Fixed Issues

  • core
    • #4972: [core] Update ANTLR to 4.13.2
    • #6308: [core] CPD Markdown format: Add syntax highlighting
  • doc
    • #6708: [doc] Update minimal Java version for building PMD in documentation
  • java
    • #1102: [java] Improve consistency of utility class detection across rules
    • #5721: [java] StackOverflowError in 7.17.0 with nested wildcard generics
    • #5746: [java] Separate test sources and resources
    • #6688: [java] LocalVariableCouldBeFinalRule API changed
    • #6704: [java] Rename rules and properties with JUnit5 in the name
  • java-bestpractices
    • #3212: [java] Enhance UseStandardCharsets to flag some constructors of IO-related classes
    • #3777: [java] New rule: AssertStatementInTest
    • #5477: [java] JUnit5TestShouldBePackagePrivate is not applied when @Test method is only present in parent class
    • #6606: [java] UnusedPrivateField: False positive on JUnit Jupiter @FieldSource
    • #6681: [java] UnitTestShouldIncludeAssert: False positive with JUnitSoftAssertions Rule (JUnit 4)
    • #6710: [java] UseStandardCharsets: False negative when using lowercase standard charset names
    • #6719: [java] UseStandardCharsets: False negative with Java 22+ and UTF-32 charsets
  • java-codestyle
    • #2801: [java] OnlyOneReturn should have a property to allow early exits (guard clauses)
    • #4350: [java] ClassNamingConventions: testClassPattern not applied to class that inherits all its @Test methods
    • #6427: [java] UnnecessaryCast: False positive for long cast before bit-shift operations on int/byte
    • #6602: [java] LocalVariableCouldBeFinal: False negative when multiple variables are declared at once
    • #6622: [java] New rule: UnnecessaryBlock
    • #6640: [java] New rule: VariableDeclarationUsageDistance
  • java-design
    • #559: [java] UseUtilityClass: False negative for constant only classes
  • java-errorprone
    • #3288: [java] New Rule: JUnit5TestNoPrivateModifier
    • #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
    • #6652: [java] AvoidInstanceofChecksInCatchClause: false negative when pattern-matching instanceof
    • #6712: [java] UnnecessaryBooleanAssertion: Use InvocationMatcher to find assertions
  • java-multithreading
    • #6520: [java] DoNotUseThreads: False positive on legitimate java.lang.Thread.onSpinWait() call
    • #6636: [java] OverridingThreadRun: Fix false negatives with other methods and anonymous classes
  • kotlin
    • #6608: [kotlin] Lexer or parse errors are reported to stderr only without file context
    • #6648: [kotlin] Multi-dollar interpolation parse error in annotations
    • #6659: [kotlin] Parser hangs on complex files due to unbounded ATN prediction loop
    • #6669: [kotlin] Add AST improvements, KotlinAstUtil

🚨️ API Changes

Deprecations

  • java
    • FieldDeclarationsShouldBeAtStartOfClassRule#visit is an implementation detail of FieldDeclarationsShouldBeAtStartOfClassRule. It will be removed in a later release.
    • CyclomaticComplexityRule#visitTypeDecl is an implementation detail of CyclomaticComplexityRule. It will be removed in a later release.
    • SwitchDensityRule#visitSwitchLike is an implementation detail of SwitchDensityRule. It will be removed in a later release.
  • kotlin
    • The constructor PmdKotlinParser#PmdKotlinParser has been deprecated. Use KotlinLanguageModule#getInstance, createProcessor, services and getParser instead to retrieve a correctly configured parser instance.
    • The constructor KotlinHandler#KotlinHandler has been deprecated. Use getInstance, createProcessor and services instead to access the LanguageVersionHandler for Kotlin.
    • The methods KotlinInnerNode#getImage and KotlinInnerNode#hasImageEqualTo have been deprecated. They have not been used yet in Kotlin and the long-term plan is to remove these methods on each node. Concrete nodes (subclasses of KotlinInnerNode) should provide a more specific attribute like “getName” or “getIdentifier” instead and not rely on “getImage”.
      The same deprecation has been done for KotlinTerminalNode.
      See #4787 for more information.

Experimental API

  • kotlin
    • KotlinLanguageProperties#PARSE_TIMEOUT_SECONDS
    • KotlinLanguageProperties#getParseTimeoutSeconds
    • Multiple classes have been added that provide an experimental way to add custom attributes to nodes:
      • AttributeView
      • KtClassDeclarationAttributes
      • KtClassParameterAttributes
      • KtCompanionObjectAttributes
      • KtFunctionDeclarationAttributes
      • KtImportAliasAttributes
      • KtImportHeaderAttributes
      • KtVariableDeclarationAttributes
      • HasModifiers
      • HasSimpleIdentifier
    • Attributes can be accessed on each node in Java-based rules via KotlinInnerNode#attributes.
      The attributes are also automatically exposed for XPath rules.

✨️ Merged pull requests

  • #6084: [java] Shrink reported locations for some rules - Sören Glimm (@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)
  • #6557: [java] New rule: AssertStatementInTest - Zbynek Konecny (@zbynek)
  • #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 - Sören Glimm (@UncleOwen)
  • #6587: [java] Fix #2801: Add a property to OnlyOneReturnRule to allow guard ifs - Sören Glimm (@UncleOwen)
  • #6597: [java] Fix #3212: Enhance UseStandardCharsets - Sören Glimm (@UncleOwen)
  • #6601: [java] Fix #4288: Document that CallSuperFirst and CallSuperLast are android only - Sören Glimm (@UncleOwen)
  • #6603: [java] Fix #6602: Fix false negative in LocalVariableCouldBeFinalRule - Sören Glimm (@UncleOwen)
  • #6604: [java] Fix #3288: New rule JUnit5TestNoPrivateModifierRule - Sören Glimm (@UncleOwen)
  • #6605: [java] Fix #6308: Add syntax highlighting to MarkdownRenderer - Sören Glimm (@UncleOwen)
  • #6619: [java] Fix #5746: Separate test sources and resources - Sören Glimm (@UncleOwen)
  • #6623: [java] Cleanup: Remove TODO from ModifierOwner.getVisibility() - Sören Glimm (@UncleOwen)
  • #6636: [java] OverridingThreadRun: Fix false negatives with other methods and anonymous classes - Zbynek Konecny (@zbynek)
  • #6638: [java] Fix #559: Improve UseUtilityClassRule to trigger also on static members - Sören Glimm (@UncleOwen)
  • #6639: [java] New rule: UnnecessaryBlock - Sören Glimm (@UncleOwen)
  • #6640: [java] New rule: VariableDeclarationUsageDistance - Zbynek Konecny (@zbynek)
  • #6646: [test] Split up AbstractRuleSetFactoryTest.testAllPMDBuiltInRulesMeetConventions() - Sören Glimm (@UncleOwen)
  • #6650: [kotlin] Fix #6608: Improve kotlin parser error handling - Peter Paul Bakker (@stokpop)
  • #6653: [kotlin] Fix #6648: Multi-dollar interpolation for regular strings - Peter Paul Bakker (@stokpop)
  • #6654: [swift] Fix invalid swift token OSXApplicationExtension - Andreas Dangel (@adangel)
  • #6657: [java] AvoidSynchronizedStatement: Improve rule doc - Andreas Dangel (@adangel)
  • #6658: [doc] Fix capitalization of ANTLR in release notes - Zbynek Konecny (@zbynek)
  • #6660: [kotlin] Fix #6659: Prevent parser hang via InterruptibleParserATNSimulator and parse timeout - Peter Paul Bakker (@stokpop)
  • #6661: [java] Fix #6652: Support new-style instanceof (with pattern matching) in AvoidInstanceofChecksInCatchClause - Sören Glimm (@UncleOwen)
  • #6670: [kotlin] Add AST improvements, KotlinAstUtil - Peter Paul Bakker (@stokpop)
  • #6671: [java] Part of #4841: Deprecate unnecessary public methods in FieldDeclarationsShouldBeAtStartOfClassRule/CyclomaticComplexityRule/SwitchDensityRule - Sören Glimm (@UncleOwen)
  • #6679: [chore] Fix typos in comments and documentation - Zbynek Konecny (@zbynek)
  • #6680: [java] Fix #5477: JUnit5TestShouldBePackagePrivate is not applied when @Test method is only present in parent class - Sören Glimm (@UncleOwen)
  • #6683: Fix duplicated “the” in Java and Visualforce comments - vip892766gma (@vip892766gma)
  • #6686: [java] False positive for UnusedPrivateField referenced by @FieldSource - Zbynek Konecny (@zbynek)
  • #6687: LocalVariableCouldBeFinalRule: Revert API change - Sören Glimm (@UncleOwen)
  • #6689: [java] Fix #4350: Fix ClassNamingConventions by teaching TestFrameworkUtil about type resolution - Sören Glimm (@UncleOwen)
  • #6691: [java] Fix #1102: improve consistency of utility class detection across rules - Sören Glimm (@UncleOwen)
  • #6705: [java] Fix #6681: UnitTestShouldIncludeAssert: False positive with JUnitSoftAssertions Rule (JUnit 4) - Lukas Gräf (@lukasgraef)
  • #6707: [java] Fix #6704: rename rules and properties with JUnit5 in the name - Sören Glimm (@UncleOwen)
  • #6708: [doc] Update minimal Java version for building PMD in documentation - Zbynek Konecny (@zbynek)
  • #6712: [java] UnnecessaryBooleanAssertion: Use InvocationMatcher to find assertions - Zbynek Konecny (@zbynek)
  • #6716: [java] Fix #6710: Case insensitive comparison in UseStandardCharsets - Sören Glimm (@UncleOwen)
  • #6726: [java] Fix #6719: UseStandardCharsets UTF-32 on Java >= 22 - Sören Glimm (@UncleOwen)

📦️ Dependency updates

  • #6612: chore(deps): bump io.github.apex-dev-tools:apex-parser from 4.4.1 to 5.0.0
  • #6620: Bump PMD from 7.23.0 to 7.24.0
  • #6621: [core] Fix #4972: Update ANTLR from 4.9.3 to 4.13.2
  • #6631: chore(deps): bump ruby/setup-ruby from 1.305.0 to 1.306.0
  • #6635: chore(deps): bump com.google.code.gson:gson from 2.13.2 to 2.14.0
  • #6642: chore(deps): bump crate-ci/typos from 1.45.1 to 1.46.0
  • #6643: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.4.0 to 13.4.2
  • #6644: chore(deps): bump org.checkerframework:checker-qual from 4.0.0 to 4.1.0
  • #6656: chore(deps): bump nokogiri from 1.19.2 to 1.19.3 in /.ci/files
  • #6662: chore(deps): bump actions/create-github-app-token from 3.1.1 to 3.2.0
  • #6663: chore(deps): bump scalameta.version from 4.16.1 to 4.17.0
  • #6664: chore(deps): bump ruby/setup-ruby from 1.306.0 to 1.307.0
  • #6666: chore(deps): bump crate-ci/typos from 1.46.0 to 1.46.1
  • #6665: chore(deps-dev): bump log4j.version from 2.25.4 to 2.26.0
  • #6667: chore(deps): bump org.apache.groovy:groovy from 5.0.5 to 5.0.6
  • #6668: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.25.6 to 0.25.7
  • #6697: chore(deps): bump ruby/setup-ruby from 1.307.0 to 1.308.0
  • #6698: chore(deps): bump junit.version from 6.0.3 to 6.1.0
  • #6699: chore(deps): bump crate-ci/typos from 1.46.1 to 1.46.2
  • #6700: chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.2 to 3.6.3
  • #6701: chore(deps): bump org.ow2.asm:asm from 9.9.1 to 9.10
  • #6702: chore(deps): bump com.google.protobuf:protobuf-java from 4.34.1 to 4.35.0
  • #6720: chore(deps): bump crate-ci/typos from 1.46.2 to 1.46.3
  • #6721: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.25.7 to 0.26.0
  • #6722: chore(deps): bump ruby/setup-ruby from 1.308.0 to 1.310.0
  • #6723: chore(deps): bump org.ow2.asm:asm from 9.10 to 9.10.1
  • #6724: chore(deps-dev): bump com.github.hazendaz.maven:coveralls-maven-plugin from 5.0.0 to 5.1.0
  • #6725: chore(deps-dev): Update tmp from 0.2.5 to 0.2.6
  • #6729: chore(deps-dev): bump build-tools from 37 to 38

📈️ Stats

  • 308 commits
  • 72 closed tickets & PRs
  • Days since last release: 34

24-April-2026 - 7.24.0

The PMD team is pleased to announce PMD 7.24.0.

This is a minor release.

Table Of Contents

  • 🌟️ New Rules
  • 🐛️ Fixed Issues
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🌟️ New Rules

  • The new Apex rule AvoidInterfaceAsMapKey reports Map declarations (fields, variables, parameters) whose key type is an interface that has at least one abstract implementing class defining equals or hashCode. Using such maps results in potentially duplicated map entries or not being able to get entries by key.
  • The new Java rule OverridingThreadRun finds overridden Thread::run methods. This is not recommended. Instead, implement Runnable and pass an instance to the thread constructor.

🐛️ Fixed Issues

  • apex
    • #5386: [apex] Apex files ending in “Test” are skipped with a number of rules
  • apex-errorprone
    • #6492: [apex] New rule: Prevent use of interface -> abstract class with equals/hashCode as key in Map
  • apex-security
    • #5385: [apex] ApexCRUDViolation not reported even if SOQL doesn’t have permissions check on it
  • java-bestpractices
    • #4272: [java] JUnitTestsShouldIncludeAssert: False positive with assert in lambda
  • java-multithreading
    • #595: [java] New rule: Implement Runnable instead of extending Thread
  • kotlin
    • #6003: [kotlin] Support multidollar interpolation (Kotlin 2.2)

✨️ Merged pull requests

  • #6493: [apex] New Rule: AvoidInterfaceAsMapKeyRule - Jonny Alexander Power (@JonnyPower)
  • #6497: [kotlin] Fix kotlin grammar for parsing multidollar interpolation - Peter Paul Bakker (@stokpop)
  • #6555: [java] New rule: OverridingThreadRun to prefer using Runnable - Zbynek Konecny (@zbynek)
  • #6556: [java] Fix #4272: False positive in UnitTestShouldIncludeAssert when using assertion in lambda - Lukas Gräf (@lukasgraef)
  • #6563: [apex] Remove class name suffix “Test” as indicator of test classes - David Schach (@dschach)
  • #6576: [test] chore: Throw a TestAbortedException on disabled tests - UncleOwen (@UncleOwen)
  • #6577: [dist] chore: Improve error message for missing JAVA_HOME in AntIT.java - UncleOwen (@UncleOwen)
  • #6607: [doc] basic.xml has been gone for a long time - UncleOwen (@UncleOwen)

📦️ Dependency updates

  • #6515: chore: bump pmd-regression-tester from 1.6.2 to 1.7.0
  • #6552: Bump PMD from 7.22.0 to 7.23.0
  • #6564: chore(deps): bump ruby/setup-ruby from 1.295.0 to 1.299.0
  • #6565: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.7 to 1.18.8
  • #6566: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.3.0 to 13.4.0
  • #6567: chore(deps-dev): bump log4j.version from 2.25.3 to 2.25.4
  • #6569: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.7 to 1.18.8
  • #6570: chore(deps): bump org.apache.groovy:groovy from 5.0.4 to 5.0.5
  • #6571: chore(deps-dev): bump io.github.git-commit-id:git-commit-id-maven-plugin from 9.0.2 to 9.1.0
  • #6572: chore(deps): bump bigdecimal from 4.0.1 to 4.1.0 in /docs
  • #6578: chore(deps): bump marocchino/sticky-pull-request-comment from 3.0.2 to 3.0.3
  • #6579: chore(deps): bump crate-ci/typos from 1.44.0 to 1.45.0
  • #6580: chore(deps): bump ruby/setup-ruby from 1.299.0 to 1.300.0
  • #6581: chore(deps-dev): bump io.github.git-commit-id:git-commit-id-maven-plugin from 9.1.0 to 10.0.0
  • #6582: chore(deps): bump org.checkerframework:checker-qual from 3.54.0 to 4.0.0
  • #6583: chore(deps-dev): bump ant.version from 1.10.15 to 1.10.16
  • #6584: chore(deps): bump bigdecimal from 4.1.0 to 4.1.1 in /docs
  • #6588: chore(deps): bump actions/cache from 5.0.4 to 5.0.5
  • #6589: chore(deps): bump marocchino/sticky-pull-request-comment from 3.0.3 to 3.0.4
  • #6590: chore(deps): bump crate-ci/typos from 1.45.0 to 1.45.1
  • #6591: chore(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1
  • #6592: chore(deps): bump actions/create-github-app-token from 3.0.0 to 3.1.1
  • #6593: chore(deps): bump scalameta.version from 4.15.2 to 4.16.0
  • #6594: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.25.4 to 0.25.5
  • #6595: chore(deps-dev): bump com.google.guava:guava from 33.5.0-jre to 33.6.0-jre
  • #6596: chore(deps-dev): bump ant.version from 1.10.16 to 1.10.17
  • #6599: chore(deps-dev): Bump lodash from 4.17.23 to 4.18.1
  • #6600: chore(deps-dev): Bump addressable from 2.8.9 to 2.9.0
  • #6613: chore(deps): bump ruby/setup-ruby from 1.300.0 to 1.305.0
  • #6614: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.25.5 to 0.25.6
  • #6615: chore(deps): bump scalameta.version from 4.16.0 to 4.16.1
  • #6616: chore(deps-dev): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.5.0.6356 to 5.6.0.6792
  • #6617: chore(deps): bump org.jsoup:jsoup from 1.22.1 to 1.22.2
  • #6618: chore(deps): bump bigdecimal from 4.1.1 to 4.1.2 in /docs

📈️ Stats

  • 82 commits
  • 14 closed tickets & PRs
  • Days since last release: 27

27-March-2026 - 7.23.0

The PMD team is pleased to announce PMD 7.23.0.

This is a minor release.

Table Of Contents

  • 🐛️ Fixed Issues
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🐛️ Fixed Issues

  • core
    • #6503: [core] Links in HTML report are broken
  • java-errorprone
    • #6502: [java] CloseResource: False positive for allowedResourceMethodPatterns entries when using unqualified method calls
  • java-security
    • #6531: [java] InsecureCryptoIv: False negative with fixed IVs from array initializers

✨️ Merged pull requests

  • #6467: [ci] Use typos gh-action - Andreas Dangel (@adangel)
  • #6488: [doc] Update security.md for CVE-2026-28338 - Andreas Dangel (@adangel)
  • #6489: [doc] CPD: document –report-file parameter - Andreas Dangel (@adangel)
  • #6504: [core] Fix #6503: Don’t escape externalInfoUrl in reports - Andreas Dangel (@adangel)
  • #6505: [java] Fix #6502: CloseResource should consider unqualified method calls - Andreas Dangel (@adangel)
  • #6545: [java] Fix #6531: False negative in InsecureCryptoIv with array initializers - Zbynek Konecny (@zbynek)

📦️ Dependency updates

  • #6476: Bump PMD from 7.21.0 to 7.22.0
  • #6479: chore(deps): bump actions/download-artifact from 7.0.0 to 8.0.0
  • #6480: chore(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0
  • #6481: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.2.0 to 13.3.0
  • #6482: chore(deps): bump org.mockito:mockito-core from 5.21.0 to 5.22.0
  • #6483: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.5 to 1.18.7
  • #6484: chore(deps): bump org.yaml:snakeyaml from 2.5 to 2.6
  • #6485: chore(deps): bump org.checkerframework:checker-qual from 3.53.1 to 3.54.0
  • #6486: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.5 to 1.18.7
  • #6487: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.5 to 4.34.0
  • #6490: chore: Update gems, remove github-pages
  • #6498: chore(deps): bump ruby/setup-ruby from 1.288.0 to 1.290.0
  • #6499: chore(deps-dev): bump commons-logging:commons-logging from 1.3.5 to 1.3.6
  • #6500: chore(deps-dev): bump org.apache.maven.plugins:maven-shade-plugin from 3.6.1 to 3.6.2
  • #6501: chore(deps): bump org.apache.maven.plugins:maven-resources-plugin from 3.4.0 to 3.5.0
  • #6506: chore(deps): bump actions/create-github-app-token from 2.2.1 to 3.0.0
  • #6507: chore(deps): bump actions/download-artifact from 8.0.0 to 8.0.1
  • #6508: chore(deps): bump marocchino/sticky-pull-request-comment from 2.9.4 to 3.0.2
  • #6509: chore(deps): bump ruby/setup-ruby from 1.290.0 to 1.295.0
  • #6511: chore(deps): bump org.mockito:mockito-core from 5.22.0 to 5.23.0
  • #6514: chore: bump maven from 3.9.12 to 3.9.14
  • #6516: chore: bump json from 2.19.0 to 2.19.2
  • #6548: chore(deps): bump actions/cache from 5.0.3 to 5.0.4
  • #6549: chore(deps): bump com.google.protobuf:protobuf-java from 4.34.0 to 4.34.1
  • #6551: chore: use ruby4

📈️ Stats

  • 38 commits
  • 9 closed tickets & PRs
  • Days since last release: 27

27-February-2026 - 7.22.0

The PMD team is pleased to announce PMD 7.22.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Security fixes
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Deprecations
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Security fixes

  • This release fixes a stored XSS vulnerability in VBHTMLRenderer and YAHTMLRenderer via unescaped violation messages.
    Affects CI/CD pipelines that run PMD with --format vbhtml or --format yahtml on untrusted source code (e.g. pull requests from external contributors) and expose the HTML report as a build artifact. JavaScript executes in the browser context of anyone who opens the report.
    Note: The default html format is not affected by unescaped violation messages, but a similar problem existed with suppressed violation markers.
    If you use these reports, it is recommended to upgrade PMD.
    Reported by Smaran Chand (@smaranchand).

🌟️ New and Changed Rules

New Rules

  • The new Java rule UnnecessaryInterfaceDeclaration detects classes that implement interfaces that are already implemented by its superclass, and interfaces that extend other interfaces already declared by their superinterfaces.
    These declarations are redundant and can be removed to simplify the code.

Changed Rules

  • The rule CloseResource introduces a new property, allowedResourceMethodPatterns, which lets you specify method invocation patterns whose return values are resources managed externally. This is useful for ignoring managed resources - for example, Reader/Writer instances obtained from HttpServletRequest/HttpServletResponse - because the servlet container, not application code, is responsible for closing them. By default, the rule ignores InputStream/OutputStream/Reader/Writer resources returned by methods on (Http)ServletRequest and (Http)ServletResponse (both javax.servlet and jakarta.servlet).

🐛️ Fixed Issues

  • core
    • #6471: [core] BaseAntlrTerminalNode should return type instead of index for getTokenKind()
    • #6475: [core] Fix stored XSS in VBHTMLRenderer and YAHTMLRenderer
  • doc
    • #6396: [doc] Mention test-pmd-tool as alternative for testing
  • java-bestpractices
    • #6431: [java] UnitTestShouldIncludeAssert: False positive with SoftAssertionsExtension on parent/grandparent classes
  • java-codestyle
    • #6458: [java] New Rule: UnnecessaryInterfaceDeclaration
  • java-errorprone
    • #5787: [java] InvalidLogMessageFormat: False positive with lombok @Value generated methods
    • #6436: [java] CloseResource: Allow to ignore managed resources

🚨️ API Changes

Deprecations

  • core
    • CodeClimateIssue: This class is an implementation detail of CodeClimateRenderer. It will be internalized in a future release.
  • visualforce
    • DataType. The enum constants have been renamed to follow Java naming conventions. The old enum constants are deprecated and should no longer be used.
      The method DataType#fromString will return the new enum constants.
      Use DataType#fieldTypeNameOf to get the original field type name.

✨️ Merged pull requests

  • #6396: [doc] Mention test-pmd-tool as alternative for testing - Beech Horn (@metalshark)
  • #6397: [java] Add support for Lombok-generated getters in symbol resolution - Anurag Agarwal (@altaiezior)
  • #6420: [ci] build: Add typos as spell checker - Andreas Dangel (@adangel)
  • #6432: [java] UnitTestShouldIncludeAssert: False positive with SoftAssertionsExtension on parent/grandparent classes - Artur Kalimullin (@kaliy)
  • #6434: [java] chore(style): Fix lambda argument indentation for checkstyle compliance - Kai (@aclfe)
  • #6437: [java] CloseResource: Allow to ignore managed resources - Gildas Cuisinier (@gcuisinier)
  • #6445: chore: Fix FieldNamingConventions - Andreas Dangel (@adangel)
  • #6446: [doc] Add new IntelliJ Plugin “PMD X” - Andreas Dangel (@adangel)
  • #6447: chore: Small release process fixes - Andreas Dangel (@adangel)
  • #6458: [java] New Rule: UnnecessaryInterfaceDeclaration - Zbynek Konecny (@zbynek)
  • #6472: [core] Fix BaseAntlrTerminalNode getTokenKind to return type instead of index - Peter Paul Bakker (@stokpop)
  • #6475: [core] Fix stored XSS in VBHTMLRenderer and YAHTMLRenderer - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #6433: Bump PMD from 7.20.0 to 7.21.0
  • #6438: chore(deps): bump actions/cache from 5.0.2 to 5.0.3
  • #6439: chore(deps): bump ruby/setup-ruby from 1.286.0 to 1.288.0
  • #6440: chore(deps): bump scalameta.version from 4.14.6 to 4.14.7
  • #6441: chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.1 to 3.15.0
  • #6442: chore(deps): bump org.checkerframework:checker-qual from 3.53.0 to 3.53.1
  • #6443: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.0.0 to 13.1.0
  • #6444: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.4 to 4.33.5
  • #6452: chore(deps): bump actions/checkout from 6.0.1 to 6.0.2
  • #6455: chore(deps): bump org.apache.maven.plugins:maven-dependency-plugin from 3.9.0 to 3.10.0
  • #6456: chore(deps): bump com.puppycrawl.tools:checkstyle from 13.1.0 to 13.2.0
  • #6462: chore(deps): bump junit.version from 6.0.2 to 6.0.3
  • #6463: chore(deps): bump scalameta.version from 4.14.7 to 4.15.2
  • #6465: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.4 to 1.18.5
  • #6468: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.4 to 1.18.5
  • #6469: chore(deps): bump surefire.version from 3.5.4 to 3.5.5
  • #6470: chore(deps): bump org.jetbrains:annotations from 26.0.2-1 to 26.1.0
  • #6473: chore(deps): bump nokogiri to 1.19.1
  • #6474: chore(deps): bump faraday from 2.13.3 to 2.14.1

📈️ Stats

  • 66 commits
  • 16 closed tickets & PRs
  • Days since last release: 28

30-January-2026 - 7.21.0

The PMD team is pleased to announce PMD 7.21.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • 🚀️ New: Java 26 Support
    • Build Requirement is Java 21
    • CPD
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Deprecations
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

🚀️ New: Java 26 Support

This release of PMD brings support for Java 26.

There are no new standard language features.

There is one preview language feature:

  • JEP 530: Primitive Types in Patterns, instanceof, and switch (Fourth Preview)

In order to analyze a project with PMD that uses these preview language features, you’ll need to select the new language version 26-preview:

pmd check --use-version java-26-preview ...

Note: Support for Java 24 preview language features have been removed. The version “24-preview” is no longer available.

Build Requirement is Java 21

From now on, Java 21 or newer is required to build PMD. PMD itself still remains compatible with Java 8, so that it still can be used in a pure Java 8 environment. This allows us to use the latest checkstyle version during the build.

CPD

  • The Apex module now supports suppression through CPD-ON/CPD-OFF comment pairs. See #6417

🌟️ New and Changed Rules

New Rules

  • The new Java rule PublicMemberInNonPublicType detects public members (such as methods or fields) within non-public types. Non-public types should not declare public members, as their effective visibility is limited, and using the public modifier can create confusion.
  • The new Java rule UnsupportedJdkApiUsage flags the use of unsupported and non-portable JDK APIs, including sun.* packages, sun.misc.Unsafe, and jdk.internal.misc.Unsafe. These APIs are unstable, intended for internal use, and may change or be removed. The rule complements Java compiler warnings by highlighting such usage during code reviews and encouraging migration to official APIs like VarHandle and the Foreign Function & Memory API.

Changed Rules

The following rules have been changed to use a consistent implementation of enum based rule properties:

  • The property checkAddressTypes of rule AvoidUsingHardCodedIP has changed:
    • Instead of IPv4 use ipv4
    • Instead of IPv6 use ipv6
    • Instead of IPv4 mapped IPv6 use ipv4MappedIpv6
    • The old values still work, but you’ll see a deprecation warning.
  • The property nullCheckBranch of rule ConfusingTernary has changed:
    • Instead of Any use any
    • Instead of Then use then
    • Instead of Else use else
    • The old values still work, but you’ll see a deprecation warning.
  • The property typeAnnotations of rule ModifierOrder has changed:
    • Instead of ontype use onType
    • Instead of ondecl use onDecl
    • The old values still work, but you’ll see a deprecation warning.
  • The values of the properties of rule CommentRequired have changed:
    • Instead of Required use required
    • Instead of Ignored use ignored
    • Instead of Unwanted use unwanted
    • The old values still work, but you’ll see a deprecation warning.

Deprecated Rules

  • The Java rule DontImportSun has been deprecated. It is replaced by UnsupportedJdkApiUsage.

🐛️ Fixed Issues

  • core
    • #6184: [core] Consistent implementation of enum properties
  • apex
    • #6417: [apex] Support CPD suppression with “CPD-OFF” & “CPD-ON”
  • apex-codestyle
    • #6349: [apex] FieldDeclarationsShouldBeAtStart: False positive with properties
  • cli
    • #6290: [cli] Improve Designer start script
  • java
    • #5871: [java] Support Java 26
    • #6364: [java] Parse error with yield lambda inside switch
  • java-design
    • #6231: [java] New Rule: PublicMemberInNonPublicType
  • java-errorprone
    • #3601: [java] InvalidLogMessageFormat: False positive when final parameter is Supplier<Throwable>
    • #5882: [java] UnconditionalIfStatement: False negative when true/false is not literal but local variable
    • #5923: [java] New Rule: Catch usages of sun.misc.Unsafe or jdk.internal.misc.Unsafe
  • java-performance
    • #3857: [java] InsufficientStringBufferDeclaration: False negatives with String constants

🚨️ API Changes

Deprecations

  • core
    • MetricOption#valueName: When metrics are used for (rule) properties, then the conventional enum mapping (from SCREAMING_SNAKE_CASE to camelCase) will be used for the enum values. See conventionalEnumListProperty.
    • In PropertyFactory:
      • enumProperty(String, Map). Use conventionalEnumProperty instead.
      • enumProperty(String, Class). Use conventionalEnumProperty instead.
      • enumProperty(String, Class, Function). Use conventionalEnumProperty instead.
      • enumListProperty(String, Map). Use conventionalEnumListProperty instead.
      • enumListProperty(String, Class, Function). Use conventionalEnumListProperty instead.
  • java
    • AvoidBranchingStatementAsLastInLoopRule#CHECK_FOR. This constant should have never been public.
    • AvoidBranchingStatementAsLastInLoopRule#CHECK_DO. This constant should have never been public.
    • AvoidBranchingStatementAsLastInLoopRule#CHECK_WHILE. This constant should have never been public.
    • AvoidBranchingStatementAsLastInLoopRule#CHECK_BREAK_LOOP_TYPES. This property descriptor should have been private. It won’t be used anymore. Use getPropertyDescriptor on the rule to retrieve the property descriptor.
    • AvoidBranchingStatementAsLastInLoopRule#CHECK_CONTINUE_LOOP_TYPES. This property descriptor should have been private. It won’t be used anymore. Use getPropertyDescriptor on the rule to retrieve the property descriptor.
    • AvoidBranchingStatementAsLastInLoopRule#CHECK_RETURN_LOOP_TYPES. This property descriptor should have been private. It won’t be used anymore. Use getPropertyDescriptor on the rule to retrieve the property descriptor.
    • AvoidBranchingStatementAsLastInLoopRule#check. This method should have been private and will be internalized.
    • AvoidBranchingStatementAsLastInLoopRule#hasPropertyValue. This method should have been private and will be internalized.
    • AvoidBranchingStatementAsLastInLoopRule#checksNothing. This method should have been private and will be internalized.
    • ClassFanOutOption#valueName, CycloOption#valueName, NcssOption#valueName
  • lang-test
    • AbstractMetricTestRule#optionMappings. No extra mapping is required anymore. The MetricOption enum values are used. See AbstractMetricTestRule(Metric, Class) to provide the enum at construction time.

✨️ Merged pull requests

  • #6231: [java] New Rule: PublicMemberInNonPublicType - Andreas Dangel (@adangel)
  • #6232: [java] New Rule: UnsupportedJdkApiUsage - Thomas Leplus (@thomasleplus)
  • #6233: [core] Fix #6184: More consistent enum properties - Andreas Dangel (@adangel)
  • #6290: [cli] Improve Designer start script - Andreas Dangel (@adangel)
  • #6315: [java] Fix #5882: UnconditionalIfStatement false-negative if true/false is not literal - Marcel (@mrclmh)
  • #6362: chore: Fix typos - Zbynek Konecny (@zbynek)
  • #6366: [java] Fix #3857: InsufficientStringBufferDeclaration should consider constant Strings - Lukas Gräf (@lukasgraef)
  • #6373: [java] Support Java 26 - Andreas Dangel (@adangel)
  • #6377: [doc] chore: update last_updated - Andreas Dangel (@adangel)
  • #6384: chore: helper script check-all-contributors.sh - Andreas Dangel (@adangel)
  • #6386: [core] chore: Bump minimum Java version required for building to 21 - Andreas Dangel (@adangel)
  • #6387: [ci] publish-pull-requests: download latest build result - Andreas Dangel (@adangel)
  • #6389: chore: update javadoc deprecated tags - Andreas Dangel (@adangel)
  • #6390: chore: update javadoc experimental tags - Andreas Dangel (@adangel)
  • #6391: chore: update javadoc internal API tags - Andreas Dangel (@adangel)
  • #6392: [doc] ADR 3: Clarify javadoc tags - Andreas Dangel (@adangel)
  • #6394: [apex] Fix #6349: FieldDeclarationsShouldBeAtStart false positive with properties - Mohamed Hamed (@mdhamed238)
  • #6407: [java] Fix #3601: InvalidLogMessageFormat: False positive when final parameter is Supplier - [Lukas Gräf](https://github.com/lukasgraef) (@lukasgraef)
  • #6417: [apex] Support CPD suppression with “CPD-OFF” & “CPD-ON” - Jade (@goto-dev-null)
  • #6428: [ci] chore: run extensive integration tests under linux only - Andreas Dangel (@adangel)
  • #6429: [doc] chore: add keywords for auxclasspath in Java documentation - Andreas Dangel (@adangel)
  • #6430: [java] Fix #6364: Parse error with yield lambda - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #6367: Bump PMD from 7.19.0 to 7.20.0
  • #6369: chore(deps): bump ruby/setup-ruby from 1.275.0 to 1.277.0
  • #6370: chore(deps): bump org.apache.groovy:groovy from 5.0.2 to 5.0.3
  • #6371: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.2 to 1.18.3
  • #6372: chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.6.2 to 3.6.3
  • #6375: chore: Bump maven from 3.9.11 to 3.9.12
  • #6378: chore(deps): bump ruby/setup-ruby from 1.277.0 to 1.279.0
  • #6379: chore(deps): bump scalameta.version from 4.14.2 to 4.14.4
  • #6380: chore(deps): bump junit.version from 6.0.1 to 6.0.2
  • #6381: chore(deps): bump org.jsoup:jsoup from 1.21.2 to 1.22.1
  • #6382: chore(deps): bump org.checkerframework:checker-qual from 3.52.1 to 3.53.0
  • #6383: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.3.0 to 13.0.0
  • #6385: chore(deps): bump uri from 1.0.3 to 1.0.4 in /docs
  • #6399: chore(deps): bump ruby/setup-ruby from 1.279.0 to 1.282.0
  • #6400: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.25.1 to 0.25.4
  • #6401: chore(deps): bump org.sonatype.central:central-publishing-maven-plugin from 0.9.0 to 0.10.0
  • #6403: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.2 to 4.33.4
  • #6410: chore(deps): bump ruby/setup-ruby from 1.282.0 to 1.285.0
  • #6411: chore(deps): bump actions/cache from 5.0.1 to 5.0.2
  • #6412: chore(deps): bump scalameta.version from 4.14.4 to 4.14.5
  • #6413: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.3 to 1.18.4
  • #6414: chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.20.1 to 2.21.0
  • #6415: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.3 to 1.18.4
  • #6419: chore(deps-dev): bump lodash from 4.17.21 to 4.17.23
  • #6421: chore(deps): bump actions/setup-java from 5.1.0 to 5.2.0
  • #6422: chore(deps): bump actions/checkout from 6.0.1 to 6.0.2
  • #6423: chore(deps): bump scalameta.version from 4.14.5 to 4.14.6
  • #6424: chore(deps-dev): bump org.assertj:assertj-core from 3.27.6 to 3.27.7
  • #6425: chore(deps): bump org.apache.groovy:groovy from 5.0.3 to 5.0.4

📈️ Stats

  • 146 commits
  • 30 closed tickets & PRs
  • Days since last release: 30

30-December-2025 - 7.20.0

The PMD team is pleased to announce PMD 7.20.0.

This is a minor release.

Table Of Contents

  • 🌟️ Changed Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Experimental API
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🌟️ Changed Rules

  • The Java rule OnlyOneReturn has a new property ignoredMethodNames. This property by default is set to compareTo and equals, thus this rule now by default allows multiple return statements for these methods. To restore the old behavior, simply set this property to an empty value.

🐛️ Fixed Issues

  • core
    • #6330: [core] “Unable to create ValueRepresentation” when using @LiteralText (XPath)
  • java
    • #6234: [java] Parser fails to parse switch expressions in super() constructor calls
    • #6299: [java] Fix grammar of switch label
  • java-bestpractices
    • #4282: [java] GuardLogStatement: False positive when guard is not a direct parent
    • #6028: [java] UnusedPrivateMethod: False positive with raw type for generic method
    • #6257: [java] UnusedLocalVariable: False positive with instanceof pattern guard
    • #6291: [java] EnumComparison: False positive for any object when object.equals(null)
    • #6328: [java] UnusedLocalVariable: False positive for pattern variable in for-each without braces
  • java-codestyle
    • #4257: [java] OnlyOneReturn: False positive with equals method
    • #5043: [java] LambdaCanBeMethodReference: False positive on overloaded methods
    • #6237: [java] UnnecessaryCast: ContextedRuntimeException when parsing switch expression with lambdas
    • #6279: [java] EmptyMethodInAbstractClassShouldBeAbstract: False positive for final empty methods
    • #6284: [java] UnnecessaryConstructor: False positive for JavaDoc-bearing constructor
  • java-errorprone
    • #6276: [java] NullAssignment: False positive when assigning null to a final field in a constructor
    • #6343: [java] MissingStaticMethodInNonInstantiatableClass: False negative when method in nested class returns null
  • java-performance
    • #4158: [java] BigIntegerInstantiation: False negative with compile-time constant
    • #4910: [java] ConsecutiveAppendsShouldReuse: False positive within if-statement without curly braces
    • #5877: [java] AvoidArrayLoops: False negative when break inside switch statement
  • maintenance
    • #6230: [core] Single module snapshot build fails

🚨️ API Changes

Experimental API

  • pmd-java: OverloadSelectionResult#hadSeveralApplicableOverloads

✨️ Merged pull requests

  • #6262: [java] UnusedLocalVariable: fix false positive with guard in switch - Zbynek Konecny (@zbynek)
  • #6285: [java] Fix #5043: FP in LambdaCanBeMethodReference when method ref would be ambiguous - Clément Fournier (@oowekyala)
  • #6287: [doc] Explain how to build or pull snapshot dependencies for single module builds - Marcel (@mrclmh)
  • #6288: [java] Fix #6279: EmptyMethodInAbstractClassShouldBeAbstract should ignore final methods - Marcel (@mrclmh)
  • #6292: [java] Fix #6291: EnumComparison FP when comparing with null - Clément Fournier (@oowekyala)
  • #6293: [java] Fix #6276: NullAssignment should not report assigning null to a final field in a constructor - Lukas Gräf (@lukasgraef)
  • #6294: [java] Fix #6028: UnusedPrivateMethod FP - Clément Fournier (@oowekyala)
  • #6295: [java] Fix #6237: UnnecessaryCast error with switch expr returning lambdas - Clément Fournier (@oowekyala)
  • #6296: [java] Fix #4282: GuardLogStatement only detects guard methods immediately around it - Marcel (@mrclmh)
  • #6299: [java] Fix grammar of switch label - Clément Fournier (@oowekyala)
  • #6309: [java] Fix #4257: Allow ignoring methods in OnlyOneReturn - Marcel (@mrclmh)
  • #6311: [java] Fix #6284: UnnecessaryConstructor reporting false-positive on JavaDoc-bearing constructor - Marcel (@mrclmh)
  • #6313: [java] Fix #4910: if-statement triggers ConsecutiveAppendsShouldReuse - Marcel (@mrclmh)
  • #6316: [java] Fix #5877: AvoidArrayLoops false-negative when break inside switch statement - Marcel (@mrclmh)
  • #6342: [core] Fix #6330: Cannot access Chars attribute from XPath - Clément Fournier (@oowekyala)
  • #6344: [java] Fix #6328: UnusedLocalVariable should consider pattern variable in for-each without curly braces - Mohamed Hamed (@mdhamed238)
  • #6348: [jsp] Fix malformed Javadoc HTML in JspDocStyleTest - Gianmarco (@gianmarcoschifone)
  • #6359: [java] Fix #6234: Parser fails to parse switch expressions in super() constructor calls - Mohamed Hamed (@mdhamed238)
  • #6360: [java] Fix #4158: BigIntegerInstantiation false-negative with compile-time constant - Lukas Gräf (@lukasgraef)
  • #6361: [vf] Fix invalid Javadoc syntax in VfDocStyleTest - Gianmarco (@gianmarcoschifone)
  • #6363: [apex] Add sca-extra ruleset for Salesforce Apex testing - Beech Horn (@metalshark)

📦️ Dependency updates

  • #6286: Bump PMD from 7.18.0 to 7.19.0
  • #6300: chore(deps): bump actions/checkout from 6.0.0 to 6.0.1
  • #6301: chore(deps): bump org.checkerframework:checker-qual from 3.52.0 to 3.52.1
  • #6302: chore(deps): bump org.apache.maven.plugins:maven-resources-plugin from 3.3.1 to 3.4.0
  • #6303: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.1 to 1.18.2
  • #6304: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.1.2 to 12.2.0
  • #6305: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.3.0.6276 to 5.4.0.6343
  • #6306: chore(deps): bump webrick from 1.9.1 to 1.9.2 in /docs
  • #6318: chore(deps): bump actions/create-github-app-token from 2.2.0 to 2.2.1
  • #6319: chore(deps): bump actions/setup-java from 5.0.0 to 5.1.0
  • #6320: chore(deps): bump ruby/setup-ruby from 1.268.0 to 1.269.0
  • #6321: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.1 to 1.18.2
  • #6323: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.1 to 4.33.2
  • #6324: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 6.0.1 to 6.0.2
  • #6325: chore(deps): bump org.apache.maven.plugins:maven-assembly-plugin from 3.7.1 to 3.8.0
  • #6329: chore(deps): bump org.mozilla:rhino from 1.7.15 to 1.7.15.1
  • #6331: chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0
  • #6332: chore(deps): bump org.mockito:mockito-core from 5.20.0 to 5.21.0
  • #6333: chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0
  • #6334: chore(deps): bump ruby/setup-ruby from 1.269.0 to 1.270.0
  • #6335: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.2.0 to 12.3.0
  • #6336: chore(deps): bump actions/cache from 4.3.0 to 5.0.1
  • #6337: chore(deps): bump bigdecimal from 3.3.1 to 4.0.0 in /docs
  • #6339: chore(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.2.0 to 3.3.1
  • #6341: chore(deps): bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0
  • #6347: chore(deps-dev): bump org.apache.logging.log4j:log4j-core from 2.25.2 to 2.25.3 in /pmd-java
  • #6350: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.24.2 to 0.25.1
  • #6352: chore(deps): bump ruby/setup-ruby from 1.270.0 to 1.275.0
  • #6353: chore(deps): bump org.ow2.asm:asm from 9.9 to 9.9.1
  • #6354: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.2 to 1.18.3
  • #6356: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.4.0.6343 to 5.5.0.6356
  • #6357: chore(deps): bump org.apache.commons:commons-text from 1.14.0 to 1.15.0
  • #6358: chore(deps): bump bigdecimal from 4.0.0 to 4.0.1 in /docs

📈️ Stats

  • 102 commits
  • 39 closed tickets & PRs
  • Days since last release: 32

28-November-2025 - 7.19.0

The PMD team is pleased to announce PMD 7.19.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Updated PMD Designer
  • 🌟️ New and Changed Rules
    • New Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Deprecations
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Updated PMD Designer

This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog (7.19.0) and PMD Designer Changelog (7.19.1).

🌟️ New and Changed Rules

New Rules

  • The new Apex rule AvoidFutureAnnotation finds usages of the @Future annotation. It is a legacy way to execute asynchronous Apex code. New code should implement the Queueable interface instead.
  • The new Java rule EnumComparison finds usages of equals() on enum constants or values. Enums should be compared directly with == instead of equals() which has some advantages (e.g. static type checking at compile time).
  • The new Apex rule NcssCount replaces the four rules “ExcessiveClassLength”, “NcssConstructorCount”, “NcssMethodCount”, and “NcssTypeCount”. The new rule uses the metrics framework to achieve the same. It has two properties, to define the report level for method and class sizes separately. Constructors and methods are considered the same.
    The rule has been added to the quickstart ruleset.
    Note: The new metric is implemented more correct than in the old rules. E.g. it considers now also switch statements and correctly counts if-statements only once and ignores method calls that are part of an expression and not a statement on their own. This leads to different numbers. Keep in mind, that NCSS counts statements and not lines of code. Statements that are split on multiple lines are still counted as one.
  • The new PL/SQL rule NcssCount replaces the rules “ExcessiveMethodLength”, “ExcessiveObjectLength”, “ExcessivePackageBodyLength”, “ExcessivePackageSpecificationLength”, “ExcessiveTypeLength”, “NcssMethodCount” and “NcssObjectCount”. The new rule uses the metrics framework to achieve the same. It has two properties, to define the report level for method and object sizes separately.
    Note: the new metric is implemented more correct than in the old rules, so that the actual numbers of the NCSS metric from the old rules might be different from the new rule “NcssCount”. Statements that are split on multiple lines are still counted as one.

Deprecated Rules

  • The Apex rule ExcessiveClassLength has been deprecated. Use NcssCount to find big classes or create a custom XPath based rule using //ApexFile[UserClass][@EndLine - @BeginLine > 1000].
  • The Apex rules NcssConstructorCount, NcssMethodCount, and NcssTypeCount have been deprecated in favor or the new rule NcssCount.
  • The PL/SQL rule ExcessiveMethodLength has been deprecated. Use NcssCount instead or create a custom XPath based rule using //(MethodDeclaration|ProgramUnit|TriggerTimingPointSection|TriggerUnit|TypeMethod)[@EndLine - @BeginLine > 100].
  • The PL/SQL rule ExcessiveObjectLength has been deprecated. Use NcssCount instead or create a custom XPath based rule using //(PackageBody|PackageSpecification|ProgramUnit|TriggerUnit|TypeSpecification)[@EndLine - @BeginLine > 1000].
  • The PL/SQL rule ExcessivePackageBodyLength has been deprecated. Use NcssCount instead or create a custom XPath based rule using //PackageBody[@EndLine - @BeginLine > 1000].
  • The PL/SQL rule ExcessivePackageSpecificationLength has been deprecated. Use NcssCount instead or create a custom XPath based rule using //PackageSpecification[@EndLine - @BeginLine > 1000].
  • The PL/SQL rule ExcessiveTypeLength has been deprecated. Use NcssCount instead or create a custom XPath based rule using //TypeSpecification[@EndLine - @BeginLine > 1000].
  • The PL/SQL rules NcssMethodCount and NcssObjectCount have been deprecated in favor of the new rule NcssCount.

🐛️ Fixed Issues

  • core
    • #4767: [core] Deprecate old symboltable API
  • apex-bestpractices
    • #6203: [apex] New Rule: Avoid Future Annotation
  • apex-design
    • #2128: [apex] Merge NCSS count rules for Apex
  • java
    • #5689: [java] Members of record should be in scope in record header
    • #6256: [java] java.lang.IllegalArgumentException: Invalid target type of type annotation for method or ctor type annotation: 19
  • java-bestpractices
    • #5820: [java] GuardLogStatement recognizes that a string is a compile-time constant expression only if at first position
    • #6188: [java] UnitTestShouldIncludeAssert false positive when TestNG @Test.expectedException present
    • #6193: [java] New Rule: Always compare enum values with ==
  • java-codestyle
    • #6053: [java] ModifierOrder false-positives with type annotations and type parameters (typeAnnotations = anywhere)
  • java-errorprone
    • #4742: [java] EmptyFinalizer should not trigger if finalize method is final and class is not
    • #6072: [java] OverrideBothEqualsAndHashCodeOnComparable should not be required for record classes
    • #6092: [java] AssignmentInOperand false positive in 7.17.0 for case blocks in switch statements
    • #6096: [java] OverrideBothEqualsAndHashCodeOnComparable on class with lombok.EqualsAndHashCode annotation
    • #6199: [java] AssignmentInOperand: description of property allowIncrementDecrement is unclear
    • #6273: [java] TestClassWithoutTestCases documentation does not mention test prefixes
  • java-performance
    • #4577: [java] UseArraysAsList with condition in loop
    • #5071: [java] UseArraysAsList should not warn when elements are skipped in array
  • plsql-design
    • #4326: [plsql] Merge NCSS count rules for PL/SQL
  • maintenance
    • #5701: [core] net.sourceforge.pmd.cpd.SourceManager has public methods

🚨️ API Changes

Deprecations

  • core
    • net.sourceforge.pmd.lang.symboltable: All classes in this package are deprecated. The symbol table and type resolution implementation for Java has been rewritten from scratch for PMD 7.0.0. This package is the remains of the old symbol table API, that is only used by PL/SQL. For PMD 8.0.0 all these classes will be removed from pmd-core.
  • apex
    • ExcessiveClassLengthRule
    • NcssConstructorCountRule
    • NcssMethodCountRule
    • NcssTypeCountRule
    • ASTStatement: This AST node is not used and doesn’t appear in the tree.
    • ApexVisitor#visit(ASTStatement, P)
  • plsql
    • ExcessiveMethodLengthRule
    • ExcessiveObjectLengthRule
    • ExcessivePackageBodyLengthRule
    • ExcessivePackageSpecificationLengthRule
    • ExcessiveTypeLengthRule
    • NcssMethodCountRule
    • NcssObjectCountRule

✨️ Merged pull requests

  • #6081: [java] Fix #6072: OverrideBothEqualsAndHashCodeOnComparable should not be required for record classes - UncleOwen (@UncleOwen)
  • #6192: [java] Fix #6053: ModifierOrder - consider type params - Andreas Dangel (@adangel)
  • #6194: chore: always place type annotations on the type - Andreas Dangel (@adangel)
  • #6195: chore: always compare enums with == - Andreas Dangel (@adangel)
  • #6196: [java] New Rule: EnumComparison - Andreas Dangel (@adangel)
  • #6198: [apex] New rule NcssCount to replace old Ncss*Count rules - Andreas Dangel (@adangel)
  • #6201: [java] Fix #6199: AssignmentInOperandRule: Update description of allowIncrementDecrement property - Lukas Gräf (@lukasgraef)
  • #6202: [java] Fix #6188: UnitTestsShouldIncludeAssert - FP when TestNG @Test.expectedException is present - Lukas Gräf (@lukasgraef)
  • #6204: [apex] Add rule to limit usage of @Future annotation - Mitch Spano (@mitchspano)
  • #6214: [plsql] New rule NcssCount to replace old Ncss*Count rules - Andreas Dangel (@adangel)
  • #6217: [doc] Add Blue Cave to known tools using PMD - Jude Pereira (@judepereira)
  • #6227: [java] UseArraysAsList: check increment - Andreas Dangel (@adangel)
  • #6228: [java] UseArraysAsList: skip when if-statements - Andreas Dangel (@adangel)
  • #6229: chore: remove public methods from SourceManager - Andreas Dangel (@adangel)
  • #6238: [java] Fix #6096: Detect Lombok generated equals/hashCode in Comparable - Marcel (@mrclmh)
  • #6249: [core] Deprecate old symboltable API - Andreas Dangel (@adangel)
  • #6250: chore: fail build for compiler warnings - Andreas Dangel (@adangel)
  • #6251: [java] Fix #6092: AssignmentInOperand false positive in 7.17.0 for case statements - Marcel (@mrclmh)
  • #6255: [java] Fix #4742: EmptyFinalizer should not trigger if finalize method is final and class is not - Marcel (@mrclmh)
  • #6258: [java] Fix #5820: GuardLogStatement recognizes that a string is a compile-time constant expression only if at first position - Marcel (@mrclmh)
  • #6259: [java] Fix #5689: Issue with scoping of record members - Clément Fournier (@oowekyala)
  • #6277: [doc] Add button to copy configuration snippet - Zbynek Konecny (@zbynek)
  • #6278: [doc] TestClassWithoutTestCases: Mention test prefixes - Marcel (@mrclmh)
  • #6280: [ci] Exclude build resources from spring-framework for regression tester - Clément Fournier (@oowekyala)
  • #6282: [java] Fix #6256: ignore invalid annotation type - Andreas Dangel (@adangel)

📦️ Dependency updates

  • #6197: Bump PMD from 7.17.0 to 7.18.0
  • #6205: chore(deps): bump junit.version from 6.0.0 to 6.0.1
  • #6206: chore(deps): bump org.checkerframework:checker-qual from 3.51.1 to 3.52.0
  • #6207: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.17.7 to 1.17.8
  • #6208: chore(deps): bump com.google.protobuf:protobuf-java from 4.32.1 to 4.33.0
  • #6209: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.0.1 to 12.1.1
  • #6210: chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.13 to 0.8.14
  • #6219: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.17.8 to 1.18.0
  • #6220: chore(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.1.1 to 3.2.0
  • #6221: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.17.8 to 1.18.0
  • #6222: chore(deps): bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2
  • #6223: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.2.0.4988 to 5.3.0.6276
  • #6240: chore(deps): bump ruby/setup-ruby from 1.267.0 to 1.268.0
  • #6241: chore(deps): bump actions/checkout from 5.0.0 to 5.0.1
  • #6242: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.0 to 1.18.1
  • #6243: chore(deps): bump org.scala-lang:scala-library from 2.13.17 to 2.13.18
  • #6244: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.0 to 1.18.1
  • #6245: chore(deps): bump org.apache.maven.plugins:maven-jar-plugin from 3.4.2 to 3.5.0
  • #6246: chore(deps): bump org.scala-lang:scala-reflect from 2.13.17 to 2.13.18
  • #6247: chore(deps): bump com.google.protobuf:protobuf-java from 4.33.0 to 4.33.1
  • #6263: chore(deps): bump actions/checkout from 5.0.1 to 6.0.0
  • #6264: chore(deps): bump org.apache.commons:commons-lang3 from 3.19.0 to 3.20.0
  • #6265: chore(deps): bump actions/create-github-app-token from 2.1.4 to 2.2.0
  • #6266: chore(deps): bump scalameta.version from 4.14.1 to 4.14.2
  • #6267: chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.19.1 to 2.20.1
  • #6281: Bump build-tools from 35 to 36
  • #6283: Bump PMD Designer from 7.10.0 to 7.19.1

📈️ Stats

  • 122 commits
  • 44 closed tickets & PRs
  • Days since last release: 28

31-October-2025 - 7.18.0

The PMD team is pleased to announce PMD 7.18.0.

This is a minor release.

Table Of Contents

  • 🚀️ New and noteworthy
    • Build Requirement is Java 17
  • 🌟️ New and Changed Rules
    • New Rules
    • Changed Rules
    • Deprecated Rules
  • 🐛️ Fixed Issues
  • 🚨️ API Changes
    • Deprecations
  • ✨️ Merged pull requests
  • 📦️ Dependency updates
  • 📈️ Stats

🚀️ New and noteworthy

Build Requirement is Java 17

From now on, Java 17 or newer is required to build PMD. PMD itself still remains compatible with Java 8, so that it still can be used in a pure Java 8 environment. This allows us to use the latest checkstyle version during the build.

🌟️ New and Changed Rules

New Rules

  • The new Java rule IdenticalConditionalBranches finds conditional statements that do the same thing when the condition is true and false. This is either incorrect or redundant.
  • The new Java rule LabeledStatement finds labeled statements in code. Labels make control flow difficult to understand and should be avoided. By default, the rule allows labeled loops (do, while, for). But it has a property to flag also those labeled loops.
  • The new Java rule UnusedLabel finds unused labels which are unnecessary and only make the code hard to read. This new rule will be part of the quickstart ruleset.

Changed Rules

  • ConfusingTernary has a new property nullCheckBranch to control, whether null-checks should be allowed (the default case) or should lead to a violation.
  • AvoidCatchingGenericException is now configurable with the new property typesThatShouldNotBeCaught.
    ⚠️ The rule has also been moved from category “Design” to category “Error Prone”. If you are currently bulk-adding all the rules from the “Design” category into your custom ruleset, then you need to add the rule explicitly again (otherwise it won’t be included anymore):
    <rule ref="category/java/errorprone.xml/AvoidCatchingGenericException" />
    

Deprecated Rules

  • The Java rule AvoidCatchingNPE has been deprecated in favor of the updated rule AvoidCatchingGenericException, which is now configurable.
  • The Java rule AvoidCatchingThrowable has been deprecated in favor of the updated rule AvoidCatchingGenericException, which is now configurable.

🐛️ Fixed Issues

  • general
    • #4714: [core] Allow trailing commas in multivalued properties
    • #5873: [ci] Run integration test with Java 25
    • #6012: [pmd-rulesets] Rulesets should be in alphabetical order
    • #6073: [doc] Search improvements
    • #6097: [doc] Add PMD versions dropdown
    • #6098: [doc] Add a copy URL button
    • #6101: [doc] Highlight current header in TOC
    • #6149: [doc] Reproducible Build Documentation is outdated - PMD is now built using Java 17
    • #6150: [core] Reduce memory usage of CPD’s MatchCollector
  • apex
    • #5935: [apex] @SuppressWarnings - allow whitespace around comma when suppressing multiple rules
  • apex-design
    • #6022: [apex] ExcessiveClassLength/ExcessiveParameterList include the metric in the message
  • apex-documentation
    • #6189: [apex] ApexDoc rule doesn’t match published Salesforce ApexDoc specification
  • java
    • #4904: [java] Renderers output wrong class qualified name for nested classes
    • #6127: [java] Incorrect variable name in violation
    • #6132: [java] Implement main method launch protocol priorities
    • #6146: [java] ClassCastException: class InferenceVarSym cannot be cast to class JClassSymbol
  • java-bestpractices
    • #2928: [java] New rules about labeled statements
    • #4122: [java] CheckResultSet false-positive with local variable
    • #6124: [java] UnusedLocalVariable: fix false negatives in pattern matching
    • #6169: [java] AvoidUsingHardCodedIP: violation message should mention the hard coded address
    • #6171: [java] AvoidUsingHardCodedIP: fix false positive for IPv6
  • java-codestyle
    • #5919: [java] ClassNamingConventions: Include integration tests in testClassPattern by default
    • #6004: [java] Make ConfusingTernary != null configurable
    • #6029: [java] Fix UnnecessaryCast false-negative in method calls
    • #6057: [java] ModifierOrder false positive on “abstract sealed class”
    • #6079: [java] IdenticalCatchBranches: False negative for overriden method calls
    • #6123: [java] UselessParentheses FP around switch expression
    • #6131: [java] ModifierOrder: wrong enum values documented, indirectly causing xml parse errors
  • java-design
    • #1499: [java] AvoidDeeplyNestedIfStmts violations can be unintentionally undetected
    • #5569: [java] ExcessivePublicCount should report number of public “things”
  • java-documentation
    • #6058: [java] DanglingJavadoc FP in module-info files
    • #6103: [java] DanglingJavadoc false positive on record compact constructors
  • java-errorprone
    • #5042: [java] CloseResource false-positive on Pattern Matching with instanceof
    • #5878: [java] DontUseFloatTypeForLoopIndices false-negative if variable is declared before loop
    • #6038: [java] Merge AvoidCatchingNPE and AvoidCatchingThrowable into AvoidCatchingGenericException
    • #6055: [java] UselessPureMethodCall false positive with AtomicInteger::getAndIncrement
    • #6060: [java] UselessPureMethodCall false positive on ZipInputStream::getNextEntry
    • #6075: [java] AssignmentInOperand false positive with lambda expressions
    • #6083: [java] New rule IdenticalConditionalBranches
  • java-multithreading
    • #5880: [java] DoubleCheckedLocking is not detected if more than 1 assignment or more than 2 if statements
  • java-performance
    • #6172: [java] InefficientEmptyStringCheck should include String#strip
  • java-security
    • #6191: [java] HardCodedCryptoKey: NPE when constants from parent class are used
  • plsql-design
    • #6077: [plsql] Excessive*/Ncss*Count/NPathComplexity include the metric

🚨️ API Changes

Deprecations

  • java
    • The following methods have been deprecated. Due to refactoring of the internal base class, these methods are not used anymore and are not required to be implemented anymore:
      • ExcessiveImportsRule#isViolation
      • ExcessiveParameterListRule#isViolation
      • ExcessivePublicCountRule#isViolation

✨️ Merged pull requests

  • #6021: [java] Fix #5569: ExcessiveImports/ExcessiveParameterList/ExcessivePublicCount include the metric in the message - UncleOwen (@UncleOwen)
  • #6022: [apex] ExcessiveClassLength/ExcessiveParameterList include the metric in the message - UncleOwen (@UncleOwen)
  • #6023: [test] Fix #6012: Alphabetically sort all default rules - Zbynek Konecny (@zbynek)
  • #6024: [java] Fix #5878: DontUseFloatTypeForLoopIndices now checks the UpdateStatement as well - UncleOwen (@UncleOwen)
  • #6029: [java] Fix UnnecessaryCast false-negative in method calls - Zbynek Konecny (@zbynek)
  • #6031: [java] Fix #5880: False Negatives in DoubleCheckedLocking - Lukas Gräf (@lukasgraef)
  • #6039: [core] Fix #4714: trim token before feeding it to the extractor - UncleOwen (@UncleOwen)
  • #6040: [java,apex,plsql,velocity] Change description of “minimum” parameter - UncleOwen (@UncleOwen)
  • #6042: [java] Fix #2928: New Rules UnusedLabel and LabeledStatement - UncleOwen (@UncleOwen)
  • #6043: [java] Reactivate deactivated test in LocalVariableCouldBeFinal - UncleOwen (@UncleOwen)
  • #6051: [java] Fix #6038: Make AvoidCatchingGenericException configurable - UncleOwen (@UncleOwen)
  • #6056: chore: fix dogfood issues from new rules - Andreas Dangel (@adangel)
  • #6059: [java] Fix #6058: DanglingJavadoc FP in module-info files - Lukas Gräf (@lukasgraef)
  • #6061: [core] chore: Bump minimum Java version required for building to 17 - Andreas Dangel (@adangel)
  • #6071: [java] Fix #5919: Add integration tests to ClassNamingConventions testClassRegex - Anton Bobov (@abobov)
  • #6073: [doc] Search improvements - Andreas Dangel (@adangel)
  • #6074: [apex] Fix @SuppressWarnings with whitespace around comma - Juan Martín Sotuyo Dodero (@jsotuyod)
  • #6077: [plsql] Excessive/NcssCount/NPathComplexity include the metric - Andreas Dangel (@adangel)
  • #6078: [java] Fix #6075: Fix FP in AssignmentInOperandRule - UncleOwen (@UncleOwen)
  • #6080: [java] Fix #6079: IdenticalCatchBranches for overriden method calls - Zbynek Konecny (@zbynek)
  • #6082: [java] Fix false positives in UselessPureMethodCall for streams and atomics - Zbynek Konecny (@zbynek)
  • #6083: [java] New rule IdenticalConditionalBranches - Zbynek Konecny (@zbynek)
  • #6085: [java] Fix false positive for ModifierOrder - Zbynek Konecny (@zbynek)
  • #6093: [ci] Fix #5873: Run integration tests with Java 25 additionally - Andreas Dangel (@adangel)
  • #6097: [doc] Add PMD versions dropdown - Andreas Dangel (@adangel)
  • #6098: [doc] Add a copy URL button - Andreas Dangel (@adangel)
  • #6100: [java] AvoidDeeplyNestedIfStmts: fix false negative with if-else - Zbynek Konecny (@zbynek)
  • #6101: [doc] Highlight current header in TOC - Andreas Dangel (@adangel)
  • #6112: [java] DanglingJavadoc: fix false positive for compact constructors - Zbynek Konecny (@zbynek)
  • #6114: [java] Fix #4122: CheckResultSet false-positive with local variable - Lukas Gräf (@lukasgraef)
  • #6116: [java] ConfusingTernary: add configuration property for null checks - Zbynek Konecny (@zbynek)
  • #6124: [java] UnusedLocalVariable: fix false negatives in pattern matching - Zbynek Konecny (@zbynek)
  • #6128: [java] Fix #4904: Correct class name in violation decorator - Andreas Dangel (@adangel)
  • #6129: [java] Fix #6127: Correct var name in violation decorator - Andreas Dangel (@adangel)
  • #6130: [java] UselessParentheses: fix false positives for switch expressions - Zbynek Konecny (@zbynek)
  • #6132: [java] Implement main method launch protocol priorities - Zbynek Konecny (@zbynek)
  • #6133: [java] Fix #5042: CloseResource: fix false positive with pattern matching - Zbynek Konecny (@zbynek)
  • #6150: [core] Reduce memory usage of CPD’s MatchCollector - Lukas Gräf (@lukasgraef)
  • #6152: chore(deps): Update Saxon-HE from 12.5 to 12.9 - Zbynek Konecny (@zbynek)
  • #6156: [java] Fix #6146: ClassCastException in TypeTestUtil - Clément Fournier (@oowekyala)
  • #6164: [doc] Update reproducible build info with Java 17 - Andreas Dangel (@adangel)
  • #6166: [doc] Use emoji variants - Andreas Dangel (@adangel)
  • #6170: [java] Fix #6169: AvoidUsingHardCodedIP - mention address in message - Andreas Dangel (@adangel)
  • #6171: [java] AvoidUsingHardCodedIP: fix false positive for IPv6 - Andreas Dangel (@adangel)
  • #6172: [java] InefficientEmptyStringCheck should include String#strip - Zbynek Konecny (@zbynek)
  • #6185: [java] Fix #6131: Correct enum values for ModifierOrder - Andreas Dangel (@adangel)
  • #6190: [apex] Update ApexDoc rule to match the published specification - Mitch Spano (@mitchspano)
  • #6191: [java] HardCodedCryptoKey: NPE when constants from parent class are used - Zbynek Konecny (@zbynek)

📦️ Dependency updates

  • #6034: chore(deps): bump com.puppycrawl.tools:checkstyle from 10.26.1 to 11.0.1
  • #6054: Bump PMD from 7.16.0 to 7.17.0
  • #6062: chore(deps): bump surefire.version from 3.5.3 to 3.5.4
  • #6063: chore(deps): bump ruby/setup-ruby from 1.257.0 to 1.258.0
  • #6064: chore(deps): bump com.google.code.gson:gson from 2.13.1 to 2.13.2
  • #6065: chore(deps): bump actions/create-github-app-token from 2.1.1 to 2.1.4
  • #6066: chore(deps): bump org.apache.groovy:groovy from 5.0.0 to 5.0.1
  • #6067: chore(deps): bump org.apache.maven.plugins:maven-shade-plugin from 3.6.0 to 3.6.1
  • #6068: chore(deps): bump scalameta.version from 4.13.9 to 4.13.10
  • #6076: Bump pmdtester from 1.6.0 to 1.6.1
  • #6086: chore(deps): bump ruby/setup-ruby from 1.258.0 to 1.263.0
  • #6087: chore(deps-dev): bump log4j.version from 2.25.1 to 2.25.2
  • #6088: chore(deps): bump org.mockito:mockito-core from 5.19.0 to 5.20.0
  • #6089: chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.3 to 3.12.0
  • #6090: chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.19.0 to 2.19.1
  • #6091: chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin from 3.14.0 to 3.14.1
  • #6094: chore(deps): Bump rexml from 3.4.1 to 3.4.4
  • #6104: chore(deps): bump actions/cache from 4.2.4 to 4.3.0
  • #6105: chore(deps): bump org.scala-lang:scala-library from 2.13.16 to 2.13.17
  • #6106: chore(deps): bump junit.version from 5.13.4 to 6.0.0
  • #6107: chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.5.1 to 3.6.0
  • #6108: chore(deps): bump com.puppycrawl.tools:checkstyle from 10.26.1 to 11.1.0
  • #6109: chore(deps-dev): bump org.assertj:assertj-core from 3.27.4 to 3.27.6
  • #6110: chore(deps): bump org.sonatype.central:central-publishing-maven-plugin from 0.8.0 to 0.9.0
  • #6118: chore(deps): bump com.google.protobuf:protobuf-java from 4.32.0 to 4.32.1
  • #6119: chore(deps): bump com.github.hazendaz.maven:coveralls-maven-plugin from 4.7.0 to 5.0.0
  • #6120: chore(deps): bump org.scala-lang:scala-reflect from 2.13.16 to 2.13.17
  • #6121: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.23.1 to 0.24.1
  • #6122: chore(deps): bump bigdecimal from 3.2.3 to 3.3.0 in /docs
  • #6136: chore(deps): bump ruby/setup-ruby from 1.263.0 to 1.265.0
  • #6137: chore(deps): bump org.apache.maven.plugins:maven-enforcer-plugin from 3.6.1 to 3.6.2
  • #6138: chore(deps): bump scalameta.version from 4.13.10 to 4.14.0
  • #6139: chore(deps): bump com.puppycrawl.tools:checkstyle from 11.1.0 to 12.0.1
  • #6140: chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.6.0 to 3.6.1
  • #6141: chore(deps): bump org.ow2.asm:asm from 9.8 to 9.9
  • #6142: chore(deps): bump org.apache.commons:commons-lang3 from 3.18.0 to 3.19.0
  • #6143: chore(deps): bump bigdecimal from 3.3.0 to 3.3.1 in /docs
  • #6152: chore(deps): Update Saxon-HE from 12.5 to 12.9
  • #6157: chore(deps-dev): bump com.google.guava:guava from 33.4.8-jre to 33.5.0-jre
  • #6158: chore(deps): bump scalameta.version from 4.14.0 to 4.14.1
  • #6159: chore(deps): bump org.apache.maven.plugins:maven-dependency-plugin from 3.8.1 to 3.9.0
  • #6160: chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.24.1 to 0.24.2
  • #6161: chore(deps): bump org.apache.maven.plugins:maven-pmd-plugin from 3.27.0 to 3.28.0
  • #6162: chore(deps): bump org.apache.maven.plugins:maven-antrun-plugin from 3.1.0 to 3.2.0
  • #6165: Bump pmdtester from 1.6.1 to 1.6.2
  • #6173: chore(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0
  • #6174: chore(deps): bump ruby/setup-ruby from 1.265.0 to 1.267.0
  • #6175: chore(deps): bump actions/download-artifact from 5.0.0 to 6.0.0
  • #6178: chore(deps): bump org.checkerframework:checker-qual from 3.49.5 to 3.51.1
  • #6179: chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.6.1 to 3.6.2
  • #6180: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 5.10.0 to 6.0.1
  • #6181: chore(deps): bump org.apache.groovy:groovy from 5.0.1 to 5.0.2
  • #6182: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.17.7 to 1.17.8

📈️ Stats

  • 233 commits
  • 76 closed tickets & PRs
  • Days since last release: 49

12-September-2025 - 7.17.0

The PMD team is pleased to announce PMD 7.17.0.

This is a minor release.

Table Of Contents

  • 🚀 New and noteworthy
    • ✨ New Rules
    • Deprecated Rules
    • CPD: New Markdown Report Format
  • 🐛 Fixed Issues
  • 🚨 API Changes
    • Deprecations
    • Experimental API
    • PMD Report Format CSV
    • Rule Test Schema
    • Deprecations
  • ✨ Merged pull requests
  • 📦 Dependency updates
  • 📈 Stats

🚀 New and noteworthy

✨ New Rules

This release brings several new rules for both Java and Apex. Please try them out and submit feedback on our issue tracker!

  • The new apex rule AnnotationsNamingConventions enforces that annotations are used consistently in PascalCase.
    The rule is referenced in the quickstart.xml ruleset for Apex.
  • The new java rule TypeParameterNamingConventions replaces the now deprecated rule GenericsNaming. The new rule is configurable and checks for naming conventions of type parameters in generic types and methods. It can be configured via a regular expression.
    By default, this rule uses the standard Java naming convention (single uppercase letter).
    The rule is referenced in the quickstart.xml ruleset for Java.
  • The new java rule OverrideBothEqualsAndHashCodeOnComparable finds missing hashCode() and/or equals() methods on types that implement Comparable. This is important if instances of these classes are used in collections. Failing to do so can lead to unexpected behavior in sets which then do not conform to the Set interface. While the Set interface relies on equals() to determine object equality, sorted sets like TreeSet use compareTo() instead. The same issue can arise when such objects are used as keys in sorted maps.
    This rule is very similar to OverrideBothEqualsAndHashcode which has always been skipping Comparable and only reports if one of the two methods is missing. The new rule will also report, if both methods (hashCode and equals) are missing.
    The rule is referenced in the quickstart.xml ruleset for Java.
  • The new java rule UselessPureMethodCall finds method calls of pure methods whose result is not used. Ignoring the result of such method calls is likely as mistake as pure methods are side effect free.
    The rule is referenced in the quickstart.xml ruleset for Java.
  • The new java rule RelianceOnDefaultCharset finds method calls that depend on the JVM’s default charset. Using these method without specifying the charset explicitly can lead to unexpected behavior on different platforms.
  • Thew new java rule VariableCanBeInlined finds local variables that are immediately returned or thrown. This rule replaces the old rule UnnecessaryLocalBeforeReturn which only considered return statements. The new rule also finds unnecessary local variables before throw statements.
    The rule is referenced in the quickstart.xml ruleset for Java.
  • The new java rule CollectionTypeMismatch detects calls to collection methods where we suspect the types are incompatible. This happens for instance when you try to remove a String from a Collection<Integer>: although it is allowed to write this because remove takes an Object parameter, it is most likely a mistake.
    This rule is referenced in the quickstart.xml ruleset for Java.
  • The new java rule DanglingJavadoc finds Javadoc comments that do not belong to a class, method or field. These comments are ignored by the Javadoc tool and should either be corrected or removed.
    The rule is referenced in the quickstart.xml ruleset for Java.
  • The new java rule ModifierOrder (codestyle) finds incorrectly ordered modifiers (e.g., static public instead of public static). It ensures modifiers appear in the correct order as recommended by the Java Language Specification.

Deprecated Rules

  • The java rule GenericsNaming has been deprecated for removal in favor of the new rule TypeParameterNamingConventions.
  • The java rule AvoidLosingExceptionInformation has been deprecated for removal in favor of the new rule UselessPureMethodCall.
  • The java rule UselessOperationOnImmutable has been deprecated for removal in favor of the new rule UselessPureMethodCall.
  • The java rule UnnecessaryLocalBeforeReturn has been deprecated for removal in favor of the new rule VariableCanBeInlined.

CPD: New Markdown Report Format

This PMD version ships with a simple Markdown based output format for CPD. It outputs all duplications one after another including the code snippets as code blocks.
See Report formats for CPD.

🐛 Fixed Issues

  • apex-codestyle
    • #5650: [apex] New Rule: AnnotationsNamingConventions
  • core
    • #4721: [core] chore: Enable XML rule MissingEncoding in dogfood ruleset
    • #5849: [core] Support Markdown Output for CPD Reports
    • #5958: [core] CSVRenderer: Add begin and end for line and columns (default off)
  • java
    • #5874: [java] Update java regression tests with Java 25 language features
    • #5960: [java] Avoid/reduce duplicate error messages for some rules
    • #6014: [java] Crash when encountering a java comment at the end of a file
  • java-bestpractices
    • #2186: [java] New Rule: RelianceOnDefaultCharset
    • #4500: [java] AvoidReassigningLoopVariables - false negatives within for-loops and skip allowed
    • #4770: [java] UnusedFormalParameter should ignore public constructor as same as method
    • #5198: [java] CheckResultSet false-positive with local variable checked in a while loop
  • java-codestyle
    • #972: [java] Improve naming conventions rules
    • #4916: [java] UseExplicitTypes: cases where ‘var’ should be unobjectionable
    • #5601: [java] New Rule: ModifierOrder
    • #5770: [java] New Rule: VariableCanBeInlined: Local variables should not be declared and then immediately returned or thrown
    • #5922: [java] New Rule: TypeParameterNamingConventions
    • #5948: [java] UnnecessaryBoxing false positive when calling List.remove(int)
    • #5982: [java] More detailed message for the UselessParentheses rule
  • java-design
    • #4911: [java] AvoidRethrowingException should allow rethrowing exception subclasses
    • #5023: [java] UseUtilityClass implementation hardcodes a message instead of using the one defined in the XML
  • java-documentation
    • #5916: [java] New Rule: DanglingJavadoc
  • java-errorprone
    • #3401: [java] Improve AvoidUsingOctalValues documentation
    • #3434: [java] False negatives in AssignmentInOperand Rule
    • #5837: [java] New Rule: OverrideBothEqualsAndHashCodeOnComparable
    • #5881: [java] AvoidLosingExceptionInformation does not trigger when inside if-else
    • #5907: [java] New Rule: UselessPureMethodCall
    • #5915: [java] AssignmentInOperand not raised when inside do-while loop
    • #5949: [java] New Rule: CollectionTypeMismatch: for Collections methods that take Object as a parameter
    • #5974: [java] CloseResourceRule: NullPointerException while analyzing
  • test
    • #5973: [test] Enable XML validation for rule tests

🚨 API Changes

Deprecations

  • pmd-java:
    • JClassSymbol#annotationAppliesTo: Use JClassSymbol#annotationAppliesToContext instead.

      Experimental API

  • pmd-core: RuleContext#addViolationWithPosition

PMD Report Format CSV

The CSV report format for PMD as three new columns:

  • End Line
  • Begin Column
  • End Column

These columns are not enabled by default, but can be activated via their respective renderer properties. See Report formats for PMD.

Rule Test Schema

When executing rule tests, the rule test XML file will be validated against the schema and the tests will fail if the XML file is invalid.

There was a small bug in the schema around verifying suppressed violations: If a test wanted to verify, that there are no suppressed violations, then this was not possible. Now the <expected-suppression> element may be empty. This is available in version 1.1.1 of the schema. See Testing your rules for more information.

Deprecations

  • test
    • The method AbstractRuleSetFactoryTest#hasCorrectEncoding will be removed. PMD has the rule MissingEncoding for XML files that should be used instead.

✨ Merged pull requests

  • #5601: [java] New Rule: ModifierOrder - Clément Fournier (@oowekyala)
  • #5822: [apex] Fix #5650: New Rule: AnnotationsNamingConventions - Mitch Spano (@mitchspano)
  • #5847: [java] Fix #5770: New Rule: VariableCanBeInlined - Vincent Potucek (@Pankraz76)
  • #5856: [java] Fix #5837: New Rule: OverrideBothEqualsAndHashCodeOnComparable - Vincent Potucek (@Pankraz76)
  • #5907: [java] New Rule: UselessPureMethodCall - Zbynek Konecny (@zbynek)
  • #5916: [java] New Rule: DanglingJavadoc - Zbynek Konecny (@zbynek)
  • #5922: [java] Fix #972: Add a new rule TypeParameterNamingConventions - UncleOwen (@UncleOwen)
  • #5924: [java] Fix #5915: Fix AssignmentInOperandRule to also work an do-while loops and switch statements - UncleOwen (@UncleOwen)
  • #5930: [java] Fix #4500: Fix AvoidReassigningLoopVariablesRule to allow only simple assignments in the forReassign=skip case - UncleOwen (@UncleOwen)
  • #5931: [java] Fix #5023: Fix UseUtilityClassRule to use the message provided in design.xml - UncleOwen (@UncleOwen)
  • #5932: [ci] Reuse GitHub Pre-Releases - Andreas Dangel (@adangel)
  • #5933: [test] Fix QuickstartRulesetTests to detect deprecated rules again - Andreas Dangel (@adangel)
  • #5934: [java] Fix #2186: New Rule: RelianceOnDefaultCharset - UncleOwen (@UncleOwen)
  • #5938: [doc] Update suppression docs to reflect PMD 7 changes - Zbynek Konecny (@zbynek)
  • #5939: [java] Fix #5198: CheckResultSet FP when local variable is checked - Lukas Gräf (@lukasgraef)
  • #5954: [core] Fix #4721: Enable XML rule MissingEncoding in dogfood ruleset - Andreas Dangel (@adangel)
  • #5955: chore: Fix LiteralsFirstInComparison violations in test code - Andreas Dangel (@adangel)
  • #5957: [java] Fix #3401: Improve message/description/examples for AvoidUsingOctalValues - UncleOwen (@UncleOwen)
  • #5958: [core] CSVRenderer: Add begin and end for line and columns (default off) - Jude Pereira (@judepereira)
  • #5959: [java] Fix #5960: AddEmptyString: Improve report location - Zbynek Konecny (@zbynek)
  • #5961: [java] Fix #5960: Add details to the error message for some rules - Zbynek Konecny (@zbynek)
  • #5965: [java] Fix #5881: AvoidLosingException - Consider nested method calls - Andreas Dangel (@adangel)
  • #5967: [doc][java] ReplaceJavaUtilDate - improve doc to mention java.sql.Date - Andreas Dangel (@adangel)
  • #5968: [doc] Add logging page to sidebar under dev docs - Andreas Dangel (@adangel)
  • #5969: [doc] Add CSS in PMD’s description - Andreas Dangel (@adangel)
  • #5970: chore: CI improvements - Andreas Dangel (@adangel)
  • #5971: [java] Fix #5948: UnnecessaryBoxingRule: Check if unboxing is required for overload resolution - UncleOwen (@UncleOwen)
  • #5972: [java] Fix #3434: False negatives in AssignmentInOperand rule - UncleOwen (@UncleOwen)
  • #5975: [test] Fix #5973: Enable XML Validation for rule tests - Andreas Dangel (@adangel)
  • #5979: [java] Fix #5974: NPE in CloseResourceRule - Lukas Gräf (@lukasgraef)
  • #5980: chore: Fix typos - Zbynek Konecny (@zbynek)
  • #5981: [java] Fix #4911: AvoidRethrowingException consider supertypes in following catches - UncleOwen (@UncleOwen)
  • #5982: [java] More detailed message for the UselessParentheses rule - Zbynek Konecny (@zbynek)
  • #5989: [java] Improve performance of RelianceOnDefaultCharset - UncleOwen (@UncleOwen)
  • #5994: [java] Fix #4770: UnusedFormalParameter should ignore public constructor as same as method - UncleOwen (@UncleOwen)
  • #5995: [html] Add test case that tests the end of a reported violation (test for #3951) - UncleOwen (@UncleOwen)
  • #5996: [java] Fix #4916: UseExplicitTypes cases where ‘var’ should be unobjectionable - UncleOwen (@UncleOwen)
  • #6006: [java] Fix #5949: New Rule: CollectionTypeMismatch - UncleOwen (@UncleOwen)
  • #6008: [core] Fix #5849: Support Markdown Output for CPD Reports - Lukas Gräf (@lukasgraef)
  • #6009: [java] More detailed message for AvoidInstanceofChecksInCatchClause - Zbynek Konecny (@zbynek)
  • #6016: [java] Fix #6014: Crash when encountering a java comment at the end of a file - UncleOwen (@UncleOwen)

📦 Dependency updates

  • #5936: Bump PMD from 7.15.0 to 7.16.0
  • #5937: Bump pmdtester from 1.5.5 to 1.6.0
  • #5941: chore(deps): bump org.apache.commons:commons-text from 1.13.1 to 1.14.0
  • #5944: chore(deps): bump io.github.apex-dev-tools:apex-ls_2.13 from 5.9.0 to 5.10.0
  • #5945: chore(deps): bump org.junit:junit-bom from 5.13.3 to 5.13.4
  • #5946: chore(deps): bump org.apache.groovy:groovy from 4.0.27 to 4.0.28
  • #5962: chore(deps): bump scalameta.version from 4.13.8 to 4.13.9
  • #5963: chore(deps-dev): bump org.apache.commons:commons-compress from 1.27.1 to 1.28.0
  • #5976: chore(deps-dev): bump all-contributors-cli from 6.20.0 to 6.26.1
  • #5978: chore(deps-dev): bump org.assertj:assertj-core from 3.27.3 to 3.27.4
  • #5984: chore(deps): bump actions/checkout from 4.2.2 to 5.0.0
  • #5985: chore(deps): bump ruby/setup-ruby from 1.254.0 to 1.255.0
  • #5986: chore(deps): bump actions/create-github-app-token from 2.0.6 to 2.1.1
  • #5988: chore(deps): Bump build-tools from 33 to 34
  • #5990: chore(deps): Update @babel/runtime from 7.16.7 to 7.28.7
  • #5991: chore(deps): Update tmp from 0.0.33 to 0.2.5
  • #5997: chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.17.6 to 1.17.7
  • #5998: chore(deps): bump kotlin.version from 2.2.0 to 2.2.10
  • #5999: chore(deps): bump org.mockito:mockito-core from 5.18.0 to 5.19.0
  • #6000: chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.17.6 to 1.17.7
  • #6001: chore(deps): bump com.google.protobuf:protobuf-java from 4.31.1 to 4.32.0
  • #6002: chore(deps): bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3
  • #6013: chore(deps): bump actions/setup-java from 4.7.1 to 5.0.0
  • #6033: chore(deps): bump ruby/setup-ruby from 1.255.0 to 1.257.0
  • #6044: chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.1.0.4751 to 5.2.0.4988
  • #6045: chore(deps): bump org.jetbrains:annotations from 26.0.2 to 26.0.2-1
  • #6046: chore(deps): bump org.apache.groovy:groovy from 4.0.28 to 5.0.0
  • #6047: chore(deps): bump org.yaml:snakeyaml from 2.4 to 2.5
  • #6048: chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.18.0 to 2.19.0
  • #6049: chore(deps): bump org.jsoup:jsoup from 1.21.1 to 1.21.2
  • #6050: chore(deps): bump bigdecimal from 3.2.2 to 3.2.3 in /docs

📈 Stats

  • 188 commits
  • 65 closed tickets & PRs
  • Days since last release: 49

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
    • 🚀 New: Java 25 Support
    • New: CPD support for CSS
    • ✨ New Rules
  • 🐛 Fixed Issues
  • 🚨 API Changes
    • Experimental APIs that are now considered stable
  • ✨ 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

    [Page truncated to keep GeezerVison snappy.]

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.