[英]Expecting a stackmap frame - Java 8
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. 我正在使用Java8。我知道对于Java 7,有一种解决方法可以使用-XX:-UseSplitVerifier使用不太严格的验证方法。 However that option was removed in Java 8. I was wondering if there is any other solution for this. 但是,该选项在Java 8中已删除。我想知道是否还有其他解决方案。 Switching to an earlier Java is not an option. 切换到较早的Java是不可行的。
The option -XX:-UseSplitVerifier
was intended to give bytecode library and tool developers time to catch up and fix problems with stackmap tables. 选项-XX:-UseSplitVerifier
旨在为字节码库和工具开发人员提供时间来赶上并修复堆栈映射表问题。 The JVM developers decided to remove that option in the most recent JREs because there has been enough time for fixing the tools. JVM开发人员决定在最新的JRE中删除该选项,因为有足够的时间来修复工具。
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. 由于您已使用java-bytecode-asm标记了问题,因此建议您在创建类文件时使用其标志ClassWriter.COMPUTE_FRAMES
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.