27 February 2021
The PMD team is pleased to announce PMD 6.32.0.
This is a minor release.
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
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.
ApexDochas two new properties:
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.
ASTTypeTestPatternhas been renamed to
ASTTypePatternin order to align the naming to the JLS.
ASTRecordConstructorDeclarationhas been renamed to
ASTCompactConstructorDeclarationin 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.
AvoidUsingHardCodedIPRuleare deprecated and considered to be internal API. They will be removed with PMD 7.