diff options
author | acolyer <acolyer> | 2005-03-09 15:03:50 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-03-09 15:03:50 +0000 |
commit | 4ca8479d63c935c1942a41b31d7f6a0a26781dd3 (patch) | |
tree | 0ed0a50a8767bd512fc273e0b03ba34c1b86fa8c /tests/java5/annotations/aspectMembers | |
parent | f90186cb8eac1b4abae4c9b8fd74828b98f534ab (diff) | |
download | aspectj-4ca8479d63c935c1942a41b31d7f6a0a26781dd3.tar.gz aspectj-4ca8479d63c935c1942a41b31d7f6a0a26781dd3.zip |
remove accidental 1.5 dependency in tests module
Diffstat (limited to 'tests/java5/annotations/aspectMembers')
-rw-r--r-- | tests/java5/annotations/aspectMembers/a/AnnotatedAspect05.aj | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/java5/annotations/aspectMembers/a/AnnotatedAspect05.aj b/tests/java5/annotations/aspectMembers/a/AnnotatedAspect05.aj index f54f15e8d..9739187f0 100644 --- a/tests/java5/annotations/aspectMembers/a/AnnotatedAspect05.aj +++ b/tests/java5/annotations/aspectMembers/a/AnnotatedAspect05.aj @@ -1,6 +1,7 @@ package a; import org.aspectj.lang.annotation.SuppressAjWarnings; +import java.lang.annotation.Annotation; @TypeAnnotation public aspect AnnotatedAspect05 { @@ -21,7 +22,18 @@ public aspect AnnotatedAspect05 { @MethodAnnotation @SuppressAjWarnings - void around() : call(new(..)) { proceed(); } + Object around() : call(new(..)) { return proceed(); } + public static void main(String[] args) { + java.lang.reflect.Method[] methods = AnnotatedAspect05.class.getDeclaredMethods(); + for (int i = 0; i < methods.length; i++) { + if (methods[i].getName().startsWith("ajc$afterThrowing")) { + Annotation annotation = methods[i].getAnnotation(AnyAnnotation.class); + if (annotation == null) { + throw new RuntimeException("advice should be annotated"); + } + } + } + } } |