You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem:
A test class below throws ArrayIndexOutOfBoundsException with no StackTrace.
import org.junit.Test;
public class TestClass {
@Test
public void test() {
int i = 0;
i += 1000; // compiled to opcode iinc_w
}
}
I traced and found that the exception was thrown at mockit.external.asm.MethodReader.readAllLabelsInCodeBlock(MethodReader.java:339)
and it was caused by comparison of opcode IINC at MethodReader.java:354.
Opcodes.IINC should be used, not InstructionType.IINC.
Same pattern found in MethodReader.readWideInstruction.
The text was updated successfully, but these errors were encountered:
Version of JMockit that was used:
JMockit1.37
Description of the problem:
A test class below throws ArrayIndexOutOfBoundsException with no StackTrace.
I traced and found that the exception was thrown at mockit.external.asm.MethodReader.readAllLabelsInCodeBlock(MethodReader.java:339)
and it was caused by comparison of opcode IINC at MethodReader.java:354.
Opcodes.IINC should be used, not InstructionType.IINC.
Same pattern found in MethodReader.readWideInstruction.
The text was updated successfully, but these errors were encountered: