Bug 34889 - compiler warning upon incompatible throws clause in advice
Summary: compiler warning upon incompatible throws clause in advice
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-13 00:43 EST by Valentin CLA
Modified: 2003-03-14 16:30 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin CLA 2003-03-13 00:43:08 EST
The code below is in conflict with what is mentioned on pages
78-79 about the fact that it is not possible for get join points to throw a
FileNotFoundException (or any checked exception for that matter).

public aspect Test {

    int i;

    pointcut h() :
        get(int Test.i);

    before() throws java.io.FileNotFoundException : h(){
        throw new java.io.FileNotFoundException();
    }

    after() throws java.io.FileNotFoundException : h(){
        throw new java.io.FileNotFoundException();
    }
    void around() throws java.io.FileNotFoundException : h(){
        throw new java.io.FileNotFoundException();
    }
}
Comment 1 Jim Hugunin CLA 2003-03-14 16:30:18 EST
thanks for catching this before the 1.1 candidate release.  it is fixed in the 
tree and in that release