25-February-2018 - 6.1.0
The PMD team is pleased to announce PMD 6.1.0.
This is a minor release.
Table Of Contents
- New and noteworthy
- Fixed Issues
- API Changes * Changes to the Node interface * Changes to CPD renderers
- External Contributions
New and noteworthy
The Designer now supports configuring properties for XPath based rule development. The Designer is still under development and any feedback is welcome.
You can start the designer via
run.sh designer or
- #855: [java] ImmutableField false-positive with lambdas
- #877: [java] CommentRequired valid rule configuration causes PMD error
- #885: [java] CompareObjectsWithEqualsRule trigger by enum1 != enum2
- #541: [java] ConsecutiveLiteralAppends with types other than string
- #853: [scala] Upgrade scala version to support Java 9
- #739: [xml] IllegalAccessException when accessing attribute using Saxon on JRE 9
Changes to the Node interface
getXPathNodeName is added to the
Node interface, which removes the
use of the
toString of a node to get its XPath element name (see #569).
A default implementation is provided in
AbstractNode, to stay compatible
with existing implementors.
toString method of a Node is not changed for the time being, and still produces
the name of the XPath node. That behaviour may however change in future major releases,
e.g. to produce a more useful message for debugging.
Changes to CPD renderers
net.sourceforge.pmd.cpd.Renderer has been deprecated. A new interface
has been introduced to replace it. The main difference is that the new interface is meant to render directly to a
rather than to a String. This allows to greatly reduce the memory footprint of CPD, as on large projects, with many duplications,
it was causing
OutOfMemoryErrors (see #795).
net.sourceforge.pmd.cpd.FileReporter has also been deprecated as part of this change, as it’s no longer needed.
- #790: [java] Added some comments for JDK 9 - Tobias Weimer
- #803: [doc] Added SpotBugs as successor of FindBugs - Tobias Weimer
- #828: [core] Add operations to manipulate a document - Gonzalo Ibars Ingman
- #830: [java] UseArraysAsList: Description added - Tobias Weimer
- #845: [java] Fix false negative PreserveStackTrace on string concatenation - Alberto Fernández
- #868: [core] Improve XPath documentation && make small refactors - Gonzalo Ibars Ingman
- #875: [core] Support shortnames when using filelist - John Zhang
- #886: [java] Fix #885 - Matias Comercio
- #900: [core] Use the isEmpty method instead of comparing the value of size() to 0 - reudismam
- #914: [doc] Apex @SuppressWarnings documentation updated - Akshat Bahety
- #918: [doc] Add qa-eclipse as new tool - Akshat Bahety
- #927: [java][doc] Fix example of AbstractClassWithoutAnyMethod - Kazuma Watanabe