javassistV2.6.jar or javassistV3.0b.jar the same results:
Actualy I wanted to catch exceptions in during Object
creation
So I did:
public class NewCodeConverter extends ExprEditor {
public void edit(NewExpr expr) throws
CannotCompileException {
StringBuffer code = new StringBuffer(300);
code.append("{ try ");
code.append("{ $_ = $proceed($$); }");
code.append("catch (OutOfMemoryError e) { .. }");
expr.replace(code.toString());
}
}
but during execution I get:
Exception in thread "main" java.lang.VerifyError:
method: my_getmem signature: (I)V) Inconsistent
stack height 0 != 2
everything works fine without try and catch
Logged In: YES
user_id=388745
This bug has been fixed.
See the forum for details.