Jacoco with jmockit causing java.lang.ArrayIndexOutOfBoundsException

106 Views Asked by At

I have recently upgraded my project to java 17, as part of it i upgraded jacoco version to 0.8.8 and jmockit to 1.49 and all the test cases pass,

but while creating jacoco test report the same test cases are failing with java.lang.ArrayIndexOutOfBoundsException: Index 2308 out of bounds for length 1060

at the lines where we use

 new MockUp<>() {
 };

could someone tell me, what can be wrong in this

Thanks in advance.

1

There are 1 best solutions below

1
Godin On

JMockit doesn't fully support all Java 11+ features for already 4 years - see https://github.com/jmockit/jmockit1/issues/615#issuecomment-501009439