??-December-2019 - 6.21.0
The PMD team is pleased to announce PMD 6.21.0.
This is a minor release.
New and noteworthy
Modelica support
Thanks to Anatoly Trosinenko PMD supports now a new language: Modelica is a language to model complex physical systems. Both PMD and CPD are supported and there are already 3 rules available. The PMD Designer supports syntax highlighting for Modelica.
While the language implementation is quite complete, Modelica support is considered experimental for now. This is to allow us to change the rule API (e.g. the AST classes) slightly and improve the implementation based on your feedback.
Fixed Issues
- java-codestyle
- #2167: [java] UnnecessaryLocalBeforeReturn false positive with variable captured by method reference
- java-bestpractices
- #2149: [java] JUnitAssertionsShouldIncludeMessage - False positive with assertEquals and JUnit5
- java-performance
- #2141: [java] StringInstatiation: False negative with String-array access
API Changes
Deprecated APIs
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.
JavaLanguageHandler
JavaLanguageParser
JavaDataFlowHandler
- Implementations of
RuleViolationFactory
in each language module, egJavaRuleViolationFactory
. See javadoc ofRuleViolationFactory
. - Implementations of
RuleViolation
in each language module, egJavaRuleViolation
. See javadoc ofRuleViolation
.
For removal
AbstractJavaParser
AbstractJavaHandler
ASTAnyTypeDeclaration.TypeKind
ASTAnyTypeDeclaration#getKind
JavaQualifiedName
ASTCompilationUnit#declarationsAreInDefaultPackage
JavaQualifiableNode
net.sourceforge.pmd.lang.java.qname
and its contentsMethodLikeNode
- Its methods will also be removed from its implementations,
ASTMethodOrConstructorDeclaration
,ASTLambdaExpression
.
- Its methods will also be removed from its implementations,
ASTAnyTypeDeclaration#getImage
will be removed. Please usegetSimpleName()
instead. This affectsASTAnnotationTypeDeclaration#getImage
,ASTClassOrInterfaceDeclaration#getImage
, andASTEnumDeclaration#getImage
.
External Contributions
- #2041: [modelica] Initial implementation for PMD - Anatoly Trosinenko