Community
Participate
Working Groups
I'm using ajc 1.1b2 (the Version select box on this bug page only lets me select "unspecified"). If I have an intertype method declaration that throws a checked exception, and then call it without handing that exception, ajc will not complain, but the exception will be thrown at runtime. Example: class Foo { public static void main(String args[]) { Foo.bomb(); } } aspect Bomb { public static void Foo.bomb() throws Exception { throw new Exception("KABOOM"); } } Compiling these two files with ajc produces no compilation errors. If instead I define bomb() directly in Foo, ajc complains as it should: /home/dougo/daj/scratch/Foo.java:3: Unhandled exception type java.lang.Exception I notice that the documentation for intertype declarations (member introductions) says: http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/progguide/apbs04.html#d0e5340 Modifiers Type TypePattern . Id(Formals) { Body } Does this mean that "throws Exception" is not (yet) supported? Or just a documentation oversight? --Doug
fixed in current cvs tree, added as testcase to tests/bugs/ExceptionsOnInters.java BTW - Having both this bug and 29106 both submitted was very helpful even though they were marked as duplicates are examining the root cause.
*** Bug 29106 has been marked as a duplicate of this bug. ***