From e62bc97bdc2f3471aff11577f17fc0094a8902be Mon Sep 17 00:00:00 2001 From: Jasmine Karthikeyan <25208576+jaskarth@users.noreply.github.com> Date: Fri, 16 Aug 2024 23:50:07 -0400 Subject: [PATCH] Fix IOOBE in finally processing when the head block is empty --- .../java/decompiler/modules/decompiler/FinallyProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java index 0e41f4efd5..4ba7de5796 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java @@ -155,6 +155,11 @@ private Record getFinallyInformation(StructClass cl, StructMethod mt, RootStatem BasicBlockStatement firstBlockStatement = fstat.getHandler().getBasichead(); BasicBlock firstBasicBlock = firstBlockStatement.getBlock(); + + if (firstBasicBlock.getSeq().isEmpty()) { + return null; + } + Instruction instrFirst = firstBasicBlock.getInstruction(0); int firstcode = 0;