Java 7 with emma and junit causing java.lang.VerifyError and Illegal local variable Errors
Sounds strange.
First, check your code to see if you have used new grammar features introduced in JDK 1.7, like try-with-resource
or diamond operator
.
I met this VerifyError before, when using cobertura. However, when I set -XX:-UseSplitVerifier
to the junit
task, it is resolved. I set it by specifying a <jvmarg>
nested element to junit
task.
Also, most of the coverage libs seem to support JDK1.7 very poorly. However, Jacoco works fine with JDK1.7 so I am using it for now.