????? - 6.5.0-SNAPSHOT
The PMD team is pleased to announce PMD 6.5.0.
This is a minor release.
Table Of Contents
New and noteworthy
New Rules
- The new Apex rule
AvoidNonExistentAnnotations
(apex-errorprone
) detects usages non-officially supported annotations. Apex supported non existent annotations for legacy reasons. In the future, use of such non-existent annotations could result in broken Apex code that will not compile. A full list of supported annotations can be found here
Modified Rules
- The Java rule UnnecessaryModifier (
java-codestyle
) now detects enum constrcutors with explicitprivate
modifier. The rule now produces better error messages letting you know exactly which modifiers are redundant at each declaration.
Fixed Issues
- all
- ecmascript
- #861: [ecmascript] InnaccurateNumericLiteral false positive with hex literals
- java
- #1174: [java] CommentUtil.multiLinesIn() could lead to StringIndexOutOfBoundsException
- java-bestpractices
- java-codestyle
- java-design
- #1200: [java] New default NcssCount method report level is drastically reduced from values of deprecated NcssMethodCount and NcssTypeCount
- xml
- #715: [xml] ProjectVersionAsDependencyVersion false positive
API Changes
-
The utility class
net.sourceforge.pmd.lang.java.ast.CommentUtil
has been deprecated and will be removed with PMD 7.0.0. Its methods have been intended to parse javadoc tags. A more useful solution will be added around the AST nodeFormalComment
, which contains as childrenJavadocElement
nodes, which in turn provide access to theJavadocTag
.All comment AST nodes (
FormalComment
,MultiLineComment
,SingleLineComment
) have a new methodgetFilteredComment()
which provide access to the comment text without the leading/*
markers. -
The method
AbstractCommentRule.tagsIndicesIn()
has been deprecated and will be removed with PMD 7.0.0. It is not very useful, since it doesn’t extract the information in a useful way. You would still need check, which tags have been found, and with which data they might be accompanied.
External Contributions
- #836: [apex] Add a rule to prevent use of non-existent annotations - anand13s
- #1159: [ui] Allow to setup the auxclasspath in the designer - Akshat Bahety
- #1169: [core] Update stylesheets with a default namespace - Matthew Duggan
- #1183: [java] fixed typos in rule remediation - Jake Hemmerle