■ ■ ■ ■ ■ ■
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
| skipped 28 lines |
29 | 29 | | import jadx.core.dex.instructions.GotoNode; |
30 | 30 | | import jadx.core.dex.instructions.IfNode; |
31 | 31 | | import jadx.core.dex.instructions.InsnDecoder; |
| 32 | + | import jadx.core.dex.instructions.InsnType; |
32 | 33 | | import jadx.core.dex.instructions.SwitchNode; |
33 | 34 | | import jadx.core.dex.instructions.args.ArgType; |
34 | 35 | | import jadx.core.dex.instructions.args.InsnArg; |
| skipped 297 lines |
332 | 333 | | InsnNode insn = null; |
333 | 334 | | while (offset <= end && offset >= 0) { |
334 | 335 | | insn = insnByOffset[offset]; |
335 | | - | if (insn != null) { |
| 336 | + | if (insn != null && insn.getType() != InsnType.NOP) { |
336 | 337 | | if (tryBlockStarted) { |
337 | 338 | | catchBlock.addInsn(insn); |
338 | 339 | | } else if (insn.canThrowException()) { |
| skipped 4 lines |
343 | 344 | | } |
344 | 345 | | offset = InsnDecoder.getNextInsnOffset(insnByOffset, offset); |
345 | 346 | | } |
346 | | - | if (insnByOffset[end] != null) { |
347 | | - | insnByOffset[end].add(AFlag.TRY_LEAVE); |
348 | | - | } else if (insn != null) { |
| 347 | + | if (tryBlockStarted && insn != null) { |
349 | 348 | | insn.add(AFlag.TRY_LEAVE); |
350 | 349 | | } |
351 | 350 | | } |
| skipped 361 lines |