Bug 28921 - Verify error on non-Throwable in declare soft 1.1b2
Summary: Verify error on non-Throwable in declare soft 1.1b2
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-30 21:09 EST by Nicholas Lesiecki CLA
Modified: 2003-01-07 16:08 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 Nicholas Lesiecki CLA 2002-12-30 21:09:41 EST
Command:
ajc -Xlint -sourceroots simple && java simple/Except

Error:

Exception in thread "main" java.lang.VerifyError: (class: simple/Except, method:
<clinit> signature: ()V) catch_type not a subclass of Throwable

Class:

package simple;

public class Except {

    public static void a(){
        b();
    }
    /**
     * Method b.
     */
    private static void b() {
        throw new RuntimeException("Orig");
    }
    
    public static void main(String[] args) {
        try {
            a();
        } catch (SoftException e) {
            System.out.println(e.getWrappedThrowable());
        }
    }
    
    public static interface Checked{
    }
    
    static aspect Softner{
        declare parents : Exception+ && !RuntimeException implements Checked;
        declare soft : Checked : within(Except);
    }
}
Comment 1 Jim Hugunin CLA 2003-01-07 16:08:31 EST
fixed in cvs tree, test case at tests/bugs/DeclareSoftCf.java