[Invalid] No FinallyAdapter in asm / commons 6.1.1
In upgrading to asm version 6.1.1 I have found that the FinallyAdapter that has been in asm / commons is no longer there/supplied.
In version 6.1.1 I see the AdviceAdapter but not the FinallyAdapter. Is there a reason for this or is it simply an accidentlal omission from commons?
The code below is the FinallyAdapter I was using. If I am no longer allowed/expected to use this I need to understand what I should be using instead.
public abstract class FinallyAdapter extends AdviceAdapter {
protected Label startFinally = new Label();
public FinallyAdapter(final int api, MethodVisitor mv, int acc, String name, String desc) {
super(api, mv, acc, name, desc);
}
public void visitCode() {
super.visitCode();
mv.visitLabel(startFinally);
}
public void visitMaxs(int maxStack, int maxLocals) {
Label endFinally = new Label();
mv.visitTryCatchBlock(startFinally, endFinally, endFinally, null);
mv.visitLabel(endFinally);
onFinally(ATHROW);
mv.visitInsn(ATHROW);
mv.visitMaxs(maxStack, maxLocals);
}
protected final void onMethodExit(int opcode) {
if (opcode != ATHROW) {
onFinally(opcode);
}
}
protected abstract void onFinally(int opcode);
Thanks, Rob.