Re: Re: Re: Re: Detecting finally blocks?

Scott Vachalek <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
No, it's inlined into such a catch block, as well as all of the other catch
blocks and at the end of the try block.

On Thu, Dec 17, 2009 at 6:47 PM, Dave Brosius <[email protected]>wrote:

> a finally block is  just a catch block without a catch type in the jvm's
> exception table attribute.
>
>
>
> Scott Vachalek wrote:
>
>> Good point, I guess Jonathan will have to answer that.  I was thinking he
>> was looking just for the catch-all but reading it again, it does look like a
>> broader question and you are right - you'd nearly have to implement a full
>> decompiler to be able to find the finally blocks.
>>
>> On Thu, Dec 17, 2009 at 6:28 PM, Godmar Back <[email protected] <mailto:
>> [email protected]>> wrote:
>>
>>
>>    Ok - but does this address Jonathan's problem? I'd assume he's
>>    interested in whenever the finally { } code is executed, not just
>>    in an exception handler (that is, also when it's executed during a
>>    regular return.) He could identify the code in the catch-all
>>    handler, then search for it elsewhere - but it may not look
>>    exactly the same. Perhaps I misunderstood his question.
>>
>>     - Godmar
>>
>>
>>    On Thu, Dec 17, 2009 at 9:20 PM, Scott Vachalek
>>    <[email protected] <mailto:[email protected]>> wrote:
>>
>>        True... I always think of those as finally blocks, but I guess
>>        technically they are not.  If you want to ignore them they
>>        should be pretty easy to identify.
>>
>>
>>        On Thu, Dec 17, 2009 at 6:14 PM, Godmar Back <[email protected]
>>        <mailto:[email protected]>> wrote:
>>
>>            On Thu, Dec 17, 2009 at 8:35 PM, Scott Vachalek
>>            <[email protected] <mailto:[email protected]>> wrote:
>>
>>                it's not something you can rely upon entirely.  But
>>                I've never seen a null catch generated by javac for
>>                any other reason.  The contents of the handler (save
>>                exception, repeat finally code, throw saved exception)
>>                are also very predictable.
>>
>>
>>            It's also used for synchronized (obj) { } blocks where a
>>            monitorexit is required.
>>
>>             - Godmar
>>
>>
>>
>>
>>
>
>
> --
> 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
>
>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.