[英]java.lang.VerifyError: Expecting a stackmap frame at branch target with Cobertura using mojo
I am using Cobertura for my code coverage but while running the test cases all of the test cases are getting failed with below error when I run the test cases using a maven build.我将 Cobertura 用于我的代码覆盖率,但是在运行测试用例时,当我使用 Maven 构建运行测试用例时,所有测试用例都失败并出现以下错误。
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 033d 11ff ff3e 125b 1102 1fb8 0061 2a2b
0x0000010: 1102 1f3d 1100 003e c600 1912 5b1c 1d04
0x0000020: b800 b511 ffff 3e2b b600 bbc0 00b7 a700
0x0000030: 141d 9b00 0f12 5b1c 1d03 b800 b511 ffff
0x0000040: 3e01 b500 c012 5b11 0220 b800 61b1
But when I run the same test cases using Eclipse run as JUnit command it works fine.但是当我使用 Eclipse run as JUnit 命令运行相同的测试用例时,它工作正常。
In Eclipse just Right Click & in in cover configurations & add在 Eclipse 中只需右键单击并在封面配置中添加并添加
-XX:-UseSplitVerifier
to the VM Arguments in the arguments tab -XX:-UseSplitVerifier
到参数选项卡中的 VM 参数
In my case, using AdoptJDK 11 , I was able to get rid of the error using the -noverify
VM argument.在我的情况下,使用AdoptJDK 11 ,我能够使用
-noverify
VM 参数摆脱错误。 However, Cobertura doesn't support Java 1 :(但是,Cobertura 不支持 Java 1 :(
For Gradle users:对于 Gradle 用户:
test {
jvmArgs '-noverify'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.