??-August-2019 - 6.18.0
The PMD team is pleased to announce PMD 6.18.0.
This is a minor release.
New and noteworthy
New rule designer documentation
The documentation for the rule designer is now available on the main PMD documentation page: Rule Designer Reference. Check it out to learn about the usage and features of the rule designer.
New rules
- The Java rule
AvoidMessageDigestField
(java-bestpractices
) detects fields of the typejava.security.MessageDigest
. Using a message digest instance as a field would need to be synchronized, as it can easily be used by multiple threads. Without synchronization the calculated hash could be entirely wrong. Instead of declaring this as a field and synchronize access to use it from multiple threads, a new instance should be created when needed. This rule is also active when using java’s quickstart ruleset.
Fixed Issues
- all
- #1983: [core] Avoid crashes with analysis cache when classpath references non-existing directories
- java-bestpractices
- #1862: [java] New rule for MessageDigest.getInstance
- java-codestyle
- #1951: [java] UnnecessaryFullyQualifiedName rule triggered when variable name clashes with package name
API Changes
Deprecated APIs
For removal
- The methods
getImportedNameNode
andgetPackage
have been deprecated and will be removed with PMD 7.0.0.
External Contributions
- #1971: [java] 1862 - Message Digest should not be used as class field - AnthonyKot