NPE in MethodWriter.visitMaxs
I have isolated and attached a simplified test case that reveals the NPE. I am running ASM 5.0.3
I am removing the instructions of an exception handler as well as the associated TryCatchBlockNode
instance.
This does work except when a method is of the form of the NPETestCase.fails method. In this case I am
running into the following NPE:
Exception in thread "main" java.lang.NullPointerException
at jdk.internal.org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1570)
at jdk.internal.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:864)
at jdk.internal.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:756)
at jdk.internal.org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:441)
at asm_npe1.TestNPE.main(TestNPE.java:50)
To run the test case. Open the project in netbeans and run it. If no netbeans, build the classes, run the
java class asm_npe1.TestNPE passing it the path to where the class asm_npe1.NPETestCase.class has been
generated.