26 February 2022
The PMD team is pleased to announce PMD 6.43.0.
This is a minor release.
!= nullas positive condition
Some API deprecations were performed in core PMD classes, to improve compatibility with PMD 7.
Report: the constructor and other construction methods like addViolation or createReport
RuleContext: all constructors, getters and setters. A new set of stable methods, matching those in PMD 7, was added to replace the
AbstractRule. In PMD 7,
RuleContextwill be the API to report violations, and it can already be used as such in PMD 6.
configurationis unused and will be removed.
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.
RuleSet: methods that serve to apply rules, including
AbstractAccumulatingRenderer#renderFileReportis internal API and should not be overridden in own renderers.
It is now forbidden to report a violation:
nullset of format arguments (prefer a zero-length array)
Note that the message is set from the XML rule declaration, so this is only relevant if you instantiate rules manually.
RuleContext now requires setting the current rule before calling
apply. This is
done automatically by
RuleSet#apply and such. Creating and configuring a
RuleContext manually is strongly advised against, as the lifecycle of
will change drastically in PMD 7.