Bug 34889

Summary: compiler warning upon incompatible throws clause in advice
Product: [Tools] AspectJ Reporter: Valentin <Valentin.Crettaz>
Component: CompilerAssignee: Jim Hugunin <jim-aj>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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