期待一个stackmap框架 - Java 8 [英] Expecting a stackmap frame - Java 8

查看:132
本文介绍了期待一个stackmap框架 - Java 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误在此位置期待堆栈图框架。我使用的是Java 8.我知道对于Java 7,有一种解决方法可以使用-XX:-UseSplitVerifier来使用不太严格的验证方法。但是,在Java 8中删除了该选项。我想知道是否有任何其他解决方案。切换到早期的Java不是一种选择。

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.

推荐答案

选项 -XX:-UseSplitVerifier 旨在让字节码库和工具开发人员有时间赶上并修复stackmap表的问题。 JVM开发人员决定在最近的JRE中删除该选项,因为已经有足够的时间来修复工具。

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.

所以最好的解决方案就是遵循这个意图和使用一个最新的工具及其选项,以生成正确的stackmap帧。由于您已使用标记了您的问题java-bytecode-asm ,我建议你使用它的标志 ClassWriter.COMPUTE_FRAMES

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.

这篇关于期待一个stackmap框架 - Java 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆