IllegalStateException: "Undefined label used" with ASM 5

<[email protected]> Mon, 28 Apr 2014 23:47:39 +0200 (CEST)
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Hi,

I'm trying to upgrade Commons Javaflow [1] from ASM 4 to 5 and I get the
following 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);
    }


I'm not sure to understand if this is a regression in ASM 5 or a misuse of the
API, could you please hep me?

Thank you,

Emmanuel Bourg

[1] http://svn.apache.org/repos/asf/commons/sandbox/javaflow/trunk/
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws