Fix the exception handlers that Javac 1.4 produces.

git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1369 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 22 years ago
parent c761c52679
commit d1f22a62b4
  1. 9
      jode/ChangeLog
  2. 20
      jode/jode/bytecode/BytecodeInfo.java.in

@ -1,4 +1,11 @@
2002-02-25 Jochen Hoenicke <hoenicke@marge.Informatik.Uni-Oldenburg.DE>
2002-06-11 Jochen Hoenicke <jochen@gnu.org>
* jode/bytecode/BytecodeInfo.java.in (readAttribute): Fix the
exception handlers that javac 1.4 produces: I simply shorten
the start/end interval, so that the catcher is not in the end
interval.
2002-02-25 Jochen Hoenicke <jochen@gnu.org>
* jode/bytecode/ClassInfo.java.in (read): Don't check for a
maximum version anymore. Sun changes it with every release without

@ -856,6 +856,26 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes {
handlersLength--;
i--;
}
if (exceptionHandlers[i].start.getAddr()
<= exceptionHandlers[i].catcher.getAddr()
&& exceptionHandlers[i].end.getAddr()
>= exceptionHandlers[i].catcher.getAddr())
{
/* Javac 1.4 is a bit paranoid with finally and
* synchronize blocks and even breaks the JLS.
* We fix it here. Hopefully this won't produce
* any other problems.
*/
if (exceptionHandlers[i].start
== exceptionHandlers[i].catcher) {
handlersLength--;
i--;
} else {
exceptionHandlers[i].end =
exceptionHandlers[i].catcher.getPrevByAddr();
}
}
}
if (handlersLength < exceptionHandlers.length) {
Handler[] newHandlers = new Handler[handlersLength];

Loading…
Cancel
Save