Java 7 with emma and junit causing java.lang.VerifyError and Illegal local variable Errors

前端 未结 2 884
遇见更好的自我
遇见更好的自我 2021-02-07 14:59

So I\'m getting these errors

[junit] Illegal local variable table length 17 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.AppenderLayoutTest.(

相关标签:
2条回答
  • 2021-02-07 15:55

    -XX:-UseSplitVerifier

    Does work for me and I did not have to downgrade JRE from 1.7 to 1.6

    0 讨论(0)
  • 2021-02-07 15:59

    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.

    0 讨论(0)
提交回复
热议问题