@@ -162,9 +162,11 @@ public Frame<V>[] analyze(final String owner, final MethodNode method) throws An
162162 int insnOpcode = insnNode .getOpcode ();
163163 int insnType = insnNode .getType ();
164164
165- if (insnType == AbstractInsnNode .LABEL
166- || insnType == AbstractInsnNode .LINE
167- || insnType == AbstractInsnNode .FRAME ) {
165+ boolean isNoop = insnType == AbstractInsnNode .LABEL
166+ || insnType == AbstractInsnNode .LINE
167+ || insnType == AbstractInsnNode .FRAME ;
168+
169+ if (isNoop ) {
168170 merge (insnIndex + 1 , oldFrame , subroutine );
169171 newControlFlowEdge (insnIndex , insnIndex + 1 );
170172 } else {
@@ -270,12 +272,14 @@ public Frame<V>[] analyze(final String owner, final MethodNode method) throws An
270272 handler .clearStack ();
271273 handler .push (exceptionValue );
272274 merge (insnList .indexOf (tryCatchBlock .handler ), handler , subroutine );
273- // Merge the frame *after* this instruction, with its stack cleared and an exception
274- // pushed, with the handler's frame.
275- handler = newFrame (currentFrame );
276- handler .clearStack ();
277- handler .push (exceptionValue );
278- merge (insnList .indexOf (tryCatchBlock .handler ), handler , subroutine );
275+ if (!isNoop ) {
276+ // Merge the frame *after* this instruction, with its stack cleared and an exception
277+ // pushed, with the handler's frame.
278+ handler = newFrame (currentFrame );
279+ handler .clearStack ();
280+ handler .push (exceptionValue );
281+ merge (insnList .indexOf (tryCatchBlock .handler ), handler , subroutine );
282+ }
279283 }
280284 }
281285 }
0 commit comments