Reputation: 1
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.
Upvotes: 0
Views: 2008
Reputation: 298233
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 java-bytecode-asm, I suggest you use its flag ClassWriter.COMPUTE_FRAMES
when creating a class file.
Upvotes: 2