mirror of
https://github.com/alibaba/testable-mock.git
synced 2025-01-25 11:51:15 +08:00
fix issue cause by iinc bytecode
This commit is contained in:
parent
3c375713aa
commit
a6b289e136
@ -72,7 +72,9 @@ public class TestClassHandler extends BaseClassHandler {
|
||||
return;
|
||||
}
|
||||
for (AbstractInsnNode in : mn.instructions) {
|
||||
if (in.getOpcode() >= ILOAD && in.getOpcode() <= SASTORE && in instanceof VarInsnNode) {
|
||||
if (in instanceof IincInsnNode) {
|
||||
((IincInsnNode)in).var--;
|
||||
} else if (in instanceof VarInsnNode) {
|
||||
if (((VarInsnNode)in).var > 0) {
|
||||
((VarInsnNode)in).var--;
|
||||
} else if (in.getOpcode() == ALOAD) {
|
||||
|
Loading…
Reference in New Issue
Block a user