What’s new in Clover 3.2? It comes with the Java 8 language support
Clover can instrument, record code coverage, and calculate metrics for new Java 8 language features such as:
- Lambda functions (written as “one-liner” expressions, as well as code blocks in curly braces)
- Method references (such as “Math::abs”)
- Virtual extension methods (i.e. “default” methods in interfaces)
Clover also handles repeating annotations introduced in Java 8.
Clover 3.2 can generate HTML, XML, and JSON reports with Lambda functions and method references shown like methods. It can also show code coverage recorded for them.
Just run the <clover-report> Ant task with showLambdaFunctions=true and showInnerFunctions=true, e.g.:
Clover 3.2 also brings support for Java 8 directly in your IntelliJ IDEA: for text highlighting, border markers, and tool tips. This helps to pinpoint Lambda functions which were declared but never executed.
Note: It will be possible to use Clover-for-Eclipse with Java 8 too, as soon as Eclipse starts supporting it (Eclipse 4.3 Kepler does not handle Java 8 yet).
Want more info?
Read the Clover 3.2 Release Notes for more details.
Interested in trying it out? Download a free 30-day trial now.