Method code too large! exception using ASM

后端 未结 1 419
半阙折子戏
半阙折子戏 2021-01-18 19:40

I am iterating over one class using ASM code without manipulating any byte code. But when I am converting classwriter to bytearray(cw.toByteArray()), I am getting Method co

1条回答
  •  一整个雨季
    2021-01-18 20:00

    Certain methods in Java are already quite large, and instrumenting them increases their size further causing the exception that you observe. If i am not wrong the JVM imposes a size of 65535 bytes on the size of any method.

    One solution/project that tries to overcome this problem looks at splitting the offending methods ... here is the link to its git repository: https://bitbucket.org/sperber/asm-method-size. It is based off ASM itself. Hope this helps.

    0 讨论(0)
提交回复
热议问题