* jode/bytecode/BytecodeInfo.java.in (calculateMaxStack): Handle

special case for empty method.  Previous code would just crash.


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1323 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 23 years ago
parent dd5112302f
commit fa005e09ee
  1. 5
      jode/ChangeLog
  2. 5
      jode/jode/bytecode/BytecodeInfo.java.in

@ -1,3 +1,8 @@
2001-07-08 Jochen Hoenicke <jochen@gnu.org>
* jode/bytecode/BytecodeInfo.java.in (calculateMaxStack): Handle
special case for empty method. Previous code would just crash.
2001-06-15 Jochen Hoenicke <jochen@gnu.org>
* jode/jvm/SyntheticAnalyzer.java.in:

@ -920,6 +920,11 @@ 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();

Loading…
Cancel
Save