diff options
author | acolyer <acolyer> | 2005-03-10 13:00:42 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-03-10 13:00:42 +0000 |
commit | 922aeaa57dcb071c5a3007827c2268d707e557f2 (patch) | |
tree | d321aa33c41841eb9853d131f0eb5d1dd11162db /tests/java5 | |
parent | 074251e1666235f1eb62e5406821e8d05178ce9a (diff) | |
download | aspectj-922aeaa57dcb071c5a3007827c2268d707e557f2.tar.gz aspectj-922aeaa57dcb071c5a3007827c2268d707e557f2.zip |
fixes for annotation type pattern bugs uncovered in 150 tests
Diffstat (limited to 'tests/java5')
-rw-r--r-- | tests/java5/annotations/ajdkExamples/RuntimeTypeMatching.aj | 9 | ||||
-rw-r--r-- | tests/java5/pertypewithin/ajdk/AJDKExamples.aj | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/java5/annotations/ajdkExamples/RuntimeTypeMatching.aj b/tests/java5/annotations/ajdkExamples/RuntimeTypeMatching.aj index 16d85affc..086bea247 100644 --- a/tests/java5/annotations/ajdkExamples/RuntimeTypeMatching.aj +++ b/tests/java5/annotations/ajdkExamples/RuntimeTypeMatching.aj @@ -89,11 +89,10 @@ public aspect RuntimeTypeMatching { before() : insideCriticalMethod(Critical) { Signature sig = thisEnclosingJoinPointStaticPart.getSignature(); AnnotatedElement declaringTypeAnnotationInfo = sig.getDeclaringType(); - if (sig instanceof MemberSignature) { - // this must be an initialization, pre-initialization, call, execution, get, or - // set join point. - AnnotatedElement memberAnnotationInfo = ((MemberSignature)sig).getAccessibleObject(); - Critical c = memberAnnotationInfo.getAnnotation(Critical.class); + if (sig instanceof MethodSignature) { + // this must be a call or execution join point. + Method method = ((MethodSignature)sig).getMethod(); + Critical c = method.getAnnotation(Critical.class); System.out.println("Entering critical join point with reflectively obtained priority " + c.priority()); } } diff --git a/tests/java5/pertypewithin/ajdk/AJDKExamples.aj b/tests/java5/pertypewithin/ajdk/AJDKExamples.aj index 433270cf4..a03c72643 100644 --- a/tests/java5/pertypewithin/ajdk/AJDKExamples.aj +++ b/tests/java5/pertypewithin/ajdk/AJDKExamples.aj @@ -1,5 +1,6 @@ +package org.xyz.foo; import java.util.*; -public aspect AJDKExamples pertypewithin(org.xyz..*) { +public aspect AJDKExamples pertypewithin(org.xyz..* && !AJDKExamples) { // use WeakHashMap for auto-garbage collection of keys private Map<Object,Boolean> instances = new WeakHashMap<Object,Boolean>(); |