diff --git a/jode/jode/bytecode/BytecodeInfo.java.in b/jode/jode/bytecode/BytecodeInfo.java.in index fbfae83..3301319 100644 --- a/jode/jode/bytecode/BytecodeInfo.java.in +++ b/jode/jode/bytecode/BytecodeInfo.java.in @@ -920,11 +920,6 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes { private void calculateMaxStack() { maxStack = 0; - - if (instructions.getCodeLength() == 0) - /* This is an empty method; the code below would crash */ - return; - int[] stackHeights = new int[instructions.getCodeLength()]; int[] poppush = new int[2]; Stack todo = new Stack(); @@ -1200,7 +1195,12 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes { addr += length; } instructions.setLastAddr(addr); - calculateMaxStack(); + try { + calculateMaxStack(); + } catch (RuntimeException ex) { + ex.printStackTrace(); + dumpCode(GlobalOptions.err); + } for (int i=0; i< exceptionHandlers.length; i++) if (exceptionHandlers[i].type != null) gcp.putClassName(exceptionHandlers[i].type); diff --git a/jode/jode/flow/FlowBlock.java.in b/jode/jode/flow/FlowBlock.java.in index b1e575e..1fe6409 100644 --- a/jode/jode/flow/FlowBlock.java.in +++ b/jode/jode/flow/FlowBlock.java.in @@ -1729,6 +1729,8 @@ public class FlowBlock { } } return strw.toString(); + } catch (RuntimeException ex) { + return super.toString() + ": (RUNTIME EXCEPTION)"; } catch (java.io.IOException ex) { return super.toString(); }