27 February 2021
The PMD team is pleased to announce PMD 6.32.0.
This is a minor release.
This release of PMD brings support for Java 16. PMD supports JEP 394: Pattern Matching for instanceof and JEP 395: Records. Both have been promoted to be a standard language feature of Java 16.
PMD also supports JEP 397: Sealed Classes (Second Preview) as a preview
language feature. In order to analyze a project with PMD that uses these language features, you’ll need to enable
it via the environment variable PMD_JAVA_OPTS
and select the new language version 16-preview
:
export PMD_JAVA_OPTS=--enable-preview
./run.sh pmd -language java -version 16-preview ...
Note: Support for Java 14 preview language features have been removed. The version “14-preview” is no longer available.
ApexDoc
has two new properties: reportPrivate
and
reportProtected
. Previously the rule only considered public and global classes, methods, and
properties. With these properties, you can verify the existence of ApexDoc comments for private
and protected methods as well. By default, these properties are disabled to preserve backwards
compatible behavior.ASTTypeTestPattern
has been renamed to ASTTypePattern
in order to align the naming to the JLS.ASTRecordConstructorDeclaration
has been renamed to ASTCompactConstructorDeclaration
in order to align the naming to the JLS.Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the @InternalApi
annotation. You’ll also get a deprecation warning.
AvoidUsingHardCodedIPRule
are deprecated and considered to be internal API. They will be removed with PMD 7.