The jsr validation jsr quite complex, and as Tom pointed out, the jsr is out of date. Therefore, it is better to avoid it.
My jsr memory is a bit fuzzy, but ...
(Updated). The bytecode verifies that wherever two control flows are combined, the stack depth should be the same along both branches. jsr routines jsr exempt from this rule to the point. Several exception points with different stack depths can “reach” the same jsr subroutine, but the net change in the stack depth from jsr current record to the next ret should be zero (or actually minus 1, because the reason for the exception is always clicked on the record in the procedure).
In addition, while the jsr routine can “escape” and return back to the normal control flow, if so, jsr not exempt from the stack depth rule for junction points. This greatly limits situations where you can do this, as the jsr routine can be entered with different stack depths.
(And I have no doubt that everything worked out for me, but this is the best I can do.)
(I don’t quite understand how you plan to get around your jsr problem with exceptions.)
(In addition, Sun made bytecode writing much more difficult with 4 or 5 (I don’t remember which one), which makes it almost impossible for manual bytecodes. They did this because they did not know how to quickly execute checking is enough to defeat the IBM verifier differently, but that's another matter.)
source share