How can I remove some opcodes from Java class file?

为君一笑 提交于 2019-12-23 03:36:14

问题


Here are some code lines:

//   43: invokevirtual 10   test/main:a (I)test/sub1;
//   46: pop
//   47: goto +4 -> 51
//   50: athrow
//   51: aload_2

This is the byte code of a sample Java class file.

I want to remove the opcodes of lines 47, 50... from java class file.

How can I do this using ASM?

来源:https://stackoverflow.com/questions/11070680/how-can-i-remove-some-opcodes-from-java-class-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!