Thread: [pmd-devel] [ANNOUNCE] PMD 6.32.0 Released
A source code analyzer
Brought to you by:
adangel,
juansotuyo
|
From: Andreas D. <and...@pm...> - 2021-02-27 11:25:28
Attachments:
OpenPGP_signature
|
* Downloads:
https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.32.0
<https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.32.0>
* Documentation: https://pmd.github.io/pmd-6.32.0/
<https://pmd.github.io/pmd-6.32.0/>
27-February-2021 - 6.32.0
The PMD team is pleased to announce PMD 6.32.0.
This is a minor release.
Table Of Contents
* New and noteworthy
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#new-and-noteworthy>
o Java 16 Support
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#java-16-support>
o Modified Rules
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#modified-rules>
* Fixed Issues
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#fixed-issues>
* API Changes
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#api-changes>
o Experimental APIs
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#experimental-apis>
o Internal API
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#internal-api>
* External Contributions
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#external-contributions>
* Stats
<https://sourceforge.net/p/pmd/news/2021/02/pmd-6320-released/#stats>
New and noteworthy
Java 16 Support
This release of PMD brings support for Java 16. PMD supports JEP 394:
Pattern Matching for instanceof <https://openjdk.java.net/jeps/394> and
JEP 395: Records <https://openjdk.java.net/jeps/395>. Both have been
promoted
to be a standard language feature of Java 16.
PMD also supports JEP 397: Sealed Classes (Second Preview)
<https://openjdk.java.net/jeps/397> 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.
Modified Rules
* The Apex rule |ApexDoc|
<https://pmd.github.io/pmd-6.32.0/pmd_rules_apex_documentation.html#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.
Fixed Issues
* apex-documentation
o #3075 <https://github.com/pmd/pmd/issues/3075>: [apex] ApexDoc
should support private access modifier
* java
o #3101 <https://github.com/pmd/pmd/issues/3101>: [java]
NullPointerException when running PMD under JRE 11
* java-bestpractices
o #3132 <https://github.com/pmd/pmd/issues/3132>: [java]
UnusedImports with static imports on subclasses
* java-errorprone
o #2716 <https://github.com/pmd/pmd/issues/2716>: [java]
CompareObjectsWithEqualsRule: False positive with Enums
o #3089 <https://github.com/pmd/pmd/issues/3089>: [java]
CloseResource rule throws exception on spaces in property types
o #3133 <https://github.com/pmd/pmd/issues/3133>: [java]
InvalidLogMessageFormat FP with StringFormattedMessage and
ParameterizedMessage
* plsql
o #3106 <https://github.com/pmd/pmd/issues/3106>: [plsql]
ParseException while parsing EXECUTE IMMEDIATE 'drop database
link ' || linkname;
API Changes
Experimental APIs
* The experimental class |ASTTypeTestPattern| has been renamed to
|ASTTypePattern|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#>
in order to align the naming to the JLS.
* The experimental class |ASTRecordConstructorDeclaration| has been
renamed to |ASTCompactConstructorDeclaration|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTCompactConstructorDeclaration.html#>
in order to align the naming to the JLS.
* The AST types and APIs around Pattern Matching and Records are not
experimental anymore:
o |ASTVariableDeclaratorId#isPatternBinding|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#isPatternBinding()>
o |ASTPattern|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#>
o |ASTTypePattern|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#>
o |ASTRecordDeclaration|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordDeclaration.html#>
o |ASTRecordComponentList|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordComponentList.html#>
o |ASTRecordComponent|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordComponent.html#>
o |ASTRecordBody|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTRecordBody.html#>
o |ASTCompactConstructorDeclaration|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/ast/ASTCompactConstructorDeclaration.html#>
Internal API
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.
* The protected or public member of the Java rule
|AvoidUsingHardCodedIPRule|
<https://docs.pmd-code.org/apidocs/pmd-java/6.32.0/net/sourceforge/pmd/lang/java/rule/bestpractices/AvoidUsingHardCodedIPRule.html#>
are deprecated and considered to be internal API. They will be
removed with PMD 7.
External Contributions
* #3098 <https://github.com/pmd/pmd/pull/3098>: [apex] ApexDoc
optionally report private and protected - Jonathan Wiesel
<https://github.com/jonathanwiesel>
* #3107 <https://github.com/pmd/pmd/pull/3107>: [plsql] Fix
ParseException for EXECUTE IMMEDIATE str1||str2; - hvbtup
<https://github.com/hvbtup>
* #3125 <https://github.com/pmd/pmd/pull/3125>: [doc] Fix sample code
indentation in documentation - Artur Dryomov
<https://github.com/arturdryomov>
Stats
* 43 commits
* 21 closed tickets & PRs
* Days since last release: 27
|