Bug 79554 - Return in try-block disables catch-block if final-block is present
Summary: Return in try-block disables catch-block if final-block is present
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-26 08:59 EST by Thomas Knauth CLA
Modified: 2005-01-11 10:35 EST (History)
0 users

See Also:


Attachments
Minimal testcase to reproduce the bug (618 bytes, application/x-zip-compressed)
2004-11-26 09:01 EST, Thomas Knauth CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Knauth CLA 2004-11-26 08:59:22 EST
If in a try-catch-finally block, the catch block contains a (conditional) return
statement, an exception thrown within the try-block will not be handled by the
catch-block. Instead the finally block is entered an the exception is passed on.

In these cases the Exception Table contains "any"-entries, that occur befor
those of the real catch-block.

A short example can be found here:
http://www.inf.tu-dresden.de/~s7060674/temp/ajc_bug.zip
Comment 1 Thomas Knauth CLA 2004-11-26 09:01:10 EST
Created attachment 16166 [details]
Minimal testcase to reproduce the bug
Comment 2 Andrew Clement CLA 2005-01-11 06:32:58 EST
Fixed by the work done for bug 78021 which ensures the exception table entries
aren't damaged by weaving.  Fix checked in - waiting for build.
Comment 3 Andrew Clement CLA 2005-01-11 10:35:33 EST
Fix available:

BUILD COMPLETE -  build.429
Date of build: 01/11/2005 11:52:16
Time to build: 103 minutes 38 seconds
Last changed: 01/11/2005 11:22:16
Last log entry: Fixes for 78021, 79554 - both to do with us breaking the
exception table for a method on weaving *if* finally blocks are involved.
Latest good AspectJ jar available at:
download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar