Jacoco and Java 8

702 views
Skip to first unread message

jona...@jonathangiles.net

unread,
May 14, 2013, 7:46:52 PM5/14/13
to jac...@googlegroups.com
Hi all,

I'm curious about support for Java 8 in Jacoco. My team is building our software using Java 8 and we have been burnt by the fact that Cobertura (our long time unit test coverage tool) no longer works under that. We would love to continue to get useful test coverage analysis, but as of now are unable to. We are more than willing to switch to another coverage tool if necessary.

I would assume there are two aspects to this question:

1) Cobertura stops working as soon as the instrumentation / execution is run on Java 8 (even if no Java 8 language features are used). Does Jococo support this, or plan to support this sometime in the near future?

2) Further from 1), is there any support for Java 8 language features (lambdas, default methods, etc)? If not, are there any plans?

Thanks!
Jonathan Giles

Marc Hoffmann

unread,
May 15, 2013, 4:27:24 AM5/15/13
to jac...@googlegroups.com
Hi Jonathan,

1) Yes we plan to support Java 8. Currently we're waiting for a ASM
version which supports it. (See
https://github.com/jacoco/jacoco/issues/74)

2) As JaCoCo is based on byte code, the new language features should be
supported.

Best regards,
-marc

jona...@jonathangiles.net

unread,
May 15, 2013, 10:41:25 AM5/15/13
to jac...@googlegroups.com
Hi Marc,

Thanks for the response - I'm glad to hear there is a plan to support Java 8. Has there been any investigation into using the ASM_5_FUTURE SVN branch of asm as a proof-of-concept / stopgap solution?

Thanks,
Jonathan

Marc Hoffmann

unread,
May 15, 2013, 12:19:32 PM5/15/13
to jac...@googlegroups.com
Yes, ASM seems to be fine.

The problem is the Java8 JDK seems not to allow instrumenting JDK
classes anymore. Which is currently used by the JaCoCo agent to provide
runtime access to the instrumented classes.

-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages