Embed the existing code of a method in a try-finally block (2)
问题 Some time ago, I asked in Embed the existing code of a method in a try-finally block how to wrap the body of a method in a try-finally block using ASM. The solution was to visit a label for the try block at the beginning of the method body in visitCode() and to complete the try-finally block when visiting an instruction with a return opcode in visitInsn() . I was aware that the solution won't be working if a method has no return instruction which applies if the method is always leaving with