Community
Participate
Working Groups
AJDT Version: 1.4.2.200705221209 AspectJ version: 1.5.4.200705211336 I try compile sht like: public aspect ExactAnnotationTypePatternBug { before(Throwable e) : handler(Throwable+) && args(e) && !args(@NoDefaultHandler Throwable+) { } } @Retention(RetentionPolicy.CLASS) @Target(ElementType.PARAMETER) public @interface NoDefaultHandler { } public class Test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } private void th() throws Throwable { throw new Throwable(); } private void test() { try { th(); } catch (Throwable e) { } } } result: java.lang.IllegalStateException at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.getResolvedAnnotationType(ExactAnnotationTypePattern.java:56) at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:76) at org.aspectj.weaver.patterns.ExactTypePattern.matchesInstanceof(ExactTypePattern.java:141) at org.aspectj.weaver.patterns.TypePattern.matches(TypePattern.java:140) at org.aspectj.weave ... RE_1 (line 19) | L0: RETURN (line 22) method-execution(void Test.test()) end private void test() end public class Test
fix committed - thanks for the clear testcase. Will appear in an AspectJ dev build shortly and probably in an AJDT build at the end of the week.