Description
I want to upgrade Commons Javaflow from ASM 4 to 5 (same problem with 4.1 ) and I get this exception:
java.lang.IllegalStateException: Undefined label used at org.objectweb.asm.util.CheckMethodAdapter.visitMaxs(Unknown Source) at org.apache.commons.javaflow.bytecode.transformation.asm.ContinuationMethodAdapter.visitMaxs(ContinuationMethodAdapter.java:313) at org.objectweb.asm.tree.MethodNode.accept(Unknown Source) at org.apache.commons.javaflow.bytecode.transformation.asm.ContinuationMethodAnalyzer.visitEnd(ContinuationMethodAnalyzer.java:140)
the code triggering this error is:
public void visitMaxs(int maxStack, int maxLocals) { Label endLabel = new Label(); mv.visitLabel(endLabel); mv.visitLocalVariable("__stackRecorder", "L" + STACK_RECORDER + ";", null, startLabel, endLabel, stackRecorderVar); mv.visitMaxs(0, 0); }
Any idea how to fix that?