RE: Detecting finally blocks?
"Dave Brosius" <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Are you sure of this? The later JDKs spew out horrible code to handle catch/finally blocks, often repeating the catch/finally block mulitple times in byte code, even tho there is only one source level catch/finally block. It's amazing that the whole try/catch/finally mechanism works the way the parser emits code. -----Original Message----- From: "Jonathan Byrne" <[email protected]> Sent: Thursday, December 17, 2009 3:06pm To: [email protected] Subject: [asm] Detecting finally blocks? Hi, I'm parsing bytecode by extending MethodAdapter, and I'm trying to detected when I reach a "finally" block, to clarify: try { } catch(SomeException e) { } finally { // I'd like to know when I'm here } In, public void visitTryCatchBlock(Label start, Label end, Label handler, String type) the last parameter "type" is set to "null" for finally blocks, but other non-finally blocks are "null" too. I'd greatly appreciate any pointers on how to detect when I reach a finally block. Many thanks, Jon.
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws