28 August 2026
The PMD team is pleased to announce PMD 7.27.0.
This is a minor release.
This release of PMD brings support for Java 27.
There are no new standard language features.
There is one preview language feature:
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.
The Apex language support has been bumped to version 67.0 (Summer ‘26). It supports the new Multiline String literals.
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.
UnusedReturnValue (Java Error Prone) finds method calls whose result is not used,
although ignoring the result of these method calls is likely a mistake.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.InstantiableUtilityClass (Java Design) was renamed from UseUtilityClass to better reflect the problem.
The old name still works but is deprecated.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.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.CheckSkipResult has been deprecated for removal
in favor of the new rule UnusedReturnValue.UselessPureMethodCall has been deprecated for removal
in favor of the new rule UnusedReturnValue.PMDConfiguration#getClassLoader and PMDConfiguration#setClassLoader are deprecated.
Use prependAuxClasspath or setAuxClasspath to
configure the auxClasspath for analyzing Java code.getAuxClasspath and not the
deprecated getClassLoader() anymore.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.net.sourceforge.pmd.internal.util.ClasspathClassLoader has been explicitly marked as deprecated.
Using ClassLoaders directly is discouraged. Use PMDConfiguration#setAuxClasspath instead.TypeSystem#usingClassLoaderClasspath is deprecated. Using
ClassLoaders directly is discouraged. Use usingClasspath
instead.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.KotlinNodeTypeData: Provides the initial API to access type information
on Kotlin AST nodes. It’s part of the new Kotlin type-aware analysis.