diff --git a/jode/ChangeLog b/jode/ChangeLog index 0ac85fe..dbe87fb 100644 --- a/jode/ChangeLog +++ b/jode/ChangeLog @@ -1,3 +1,13 @@ +2001-02-05 Jochen Hoenicke + + * jode/expr/InvokeOperator.java.in (Environment.invokeMethod): + Fixed the call to ClassInfo.forName: it expects a class name, while + ref.getClazz() gives a type signature. + * jode/flow/TransformExceptionHandlers.java.in: + (checkAndRemoveJSR): Only invoke removeBadJSR, if there are + successors left. + (checkAndRemoveMonitorExit): likewise. + 2001-02-04 Jochen Hoenicke * jode/expr/IfThenElseOperator.java (simplify): Allow in the class$ diff --git a/jode/jode/expr/InvokeOperator.java.in b/jode/jode/expr/InvokeOperator.java.in index 66423db..b402a95 100644 --- a/jode/jode/expr/InvokeOperator.java.in +++ b/jode/jode/expr/InvokeOperator.java.in @@ -419,8 +419,10 @@ public final class InvokeOperator extends Operator Object cls, Object[] params) throws InterpreterException, InvocationTargetException { if (cls == null && ref.getClazz().equals(classSig)) { - BytecodeInfo info = - ClassInfo.forName(ref.getClazz()) + String clazzName = ref.getClazz(); + clazzName = clazzName.substring(1, ref.getClazz().length() - 1) + .replace('/', '.'); + BytecodeInfo info = ClassInfo.forName(clazzName) .findMethod(ref.getName(), ref.getType()) .getBytecode(); if (info != null) diff --git a/jode/jode/flow/TransformExceptionHandlers.java.in b/jode/jode/flow/TransformExceptionHandlers.java.in index 82d04f6..e90d6ab 100644 --- a/jode/jode/flow/TransformExceptionHandlers.java.in +++ b/jode/jode/flow/TransformExceptionHandlers.java.in @@ -387,7 +387,8 @@ public class TransformExceptionHandlers { } } } - removeBadJSR(tryFlow, catchBlock, subRoutine); + if (tryFlow.getSuccessors().contains(subRoutine)) + removeBadJSR(tryFlow, catchBlock, subRoutine); } private void checkAndRemoveMonitorExit(FlowBlock tryFlow, @@ -505,7 +506,8 @@ public class TransformExceptionHandlers { } if (subRoutine != null) { - removeBadJSR(tryFlow, catchBlock, subRoutine); + if (tryFlow.getSuccessors().contains(subRoutine)) + removeBadJSR(tryFlow, catchBlock, subRoutine); tryFlow.mergeAddr(subRoutine); } }