我正在使用JMock& JDave uninalizer,它在Java 6中运行得很好。但是在转移到Java 7后,我的单元测试使用jdave-unfinalizer失败并出现这样的错误:
java.lang.VerifyError: Expecting a stackmap frame at branch target 49
Exception Details:
Location:
com/hhi/domain/model/common/DomainAddressTestUF.testEquals()V @42: if_icmpne
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: b800 2e4c 2b2b b800 a22b 2bb6 00bc b800
0000010: c0bb 0009 592b b700 33b6 0022 4d2b 2cb8
0000020: 00a2 2bb6 00c4 2cb6 00c4 a000 0704 a700
0000030: 0403 b800 c02b 2cb6 00bc b800 c0bb 0009
0000040: 592b b700 3312 c6b6 00ca b600 224e 2b2d
0000050: b800 cd2b 2db6 00bc b800 d0b1
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:20)
at org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:13)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
有人在Java 7中使用过jdave-unfinalizer吗?
答案 0 :(得分:1)
使用-XX:-UseSplitVerifier选项解决了该问题。