24 May 2020
The PMD team is pleased to announce PMD 6.24.0.
This is a minor release.
Thanks to Fernando Cosso CPD can now find duplicates in XML files as well. This is useful to find duplicated sections in XML files.
This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog.
The new Java Rule LiteralsFirstInComparisons
(java-bestpractices
)
find String literals, that are used in comparisons and are not positioned first. Using the String literal
as the receiver of e.g. equals
helps to avoid NullPointerExceptions.
This rule is replacing the two old rules PositionLiteralsFirstInComparisons
and PositionLiteralsFirstInCaseInsensitiveComparisons
and extends the check
for the methods compareTo
, compareToIgnoreCase
and contentEquals
in addition to equals
and
equalsIgnoreCase
.
Note: This rule also replaces the two mentioned rules in Java’s quickstart ruleset.
PositionLiteralsFirstInComparisons
and PositionLiteralsFirstInCaseInsensitiveComparisons
have been deprecated
in favor of the new rule LiteralsFirstInComparisons
.BaseLanguageModule#addVersion(String, LanguageVersionHandler, boolean)
TokenMgrError
, in particular, a new constructor is available
that should be preferred to the old onesAntlrTokenManager.ANTLRSyntaxError
Note: Experimental APIs are identified with the annotation Experimental
,
see its javadoc for details
BaseLanguageModule
have been replaced by a
definitive API.