0

I am getting this error "Expecting a stackmap frame at this location". I am using Java 8. I know that for Java 7 there is a workaround to use -XX:-UseSplitVerifier to use the less strict verification method. However that option was removed in Java 8. I was wondering if there is any other solution for this. Switching to an earlier Java is not an option.

1
  • 2
    I assume that fixing the byte code to be correct is not an option? ASM has an option for correcting the frames. Commented Feb 2, 2015 at 0:07

1 Answer 1

2

The option -XX:-UseSplitVerifier was intended to give bytecode library and tool developers time to catch up and fix problems with stackmap tables. The JVM developers decided to remove that option in the most recent JREs because there has been enough time for fixing the tools.

So the best solution is to follow that intention and use an up-to-date tool and its option(s) to generate correct stackmap frames. Since you have tagged your question with , I suggest you use its flag ClassWriter.COMPUTE_FRAMES when creating a class file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.