From f9eebd48f6070a8254b38630d6d76da8c0aee80e Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 12 May 2005 13:00:07 +0000 Subject: Fix and tests for pr84312: runtime retention checking. From Andrew Huff. --- .../aspectj/weaver/patterns/BindingAnnotationTypePattern.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'weaver') diff --git a/weaver/src/org/aspectj/weaver/patterns/BindingAnnotationTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/BindingAnnotationTypePattern.java index 3d8ad311f..d32f9184b 100644 --- a/weaver/src/org/aspectj/weaver/patterns/BindingAnnotationTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/BindingAnnotationTypePattern.java @@ -50,22 +50,13 @@ public class BindingAnnotationTypePattern extends ExactAnnotationTypePattern imp world.getMessageHandler().handleMessage(m); resolved = false; } - if (!annotationType.hasAnnotation(TypeX.AT_RETENTION)) { + if (!annotationType.isAnnotationWithRuntimeRetention(world)) { // default is class visibility // default is class visibility IMessage m = MessageUtil.error( WeaverMessages.format(WeaverMessages.BINDING_NON_RUNTIME_RETENTION_ANNOTATION,annotationType.getName()), getSourceLocation()); world.getMessageHandler().handleMessage(m); resolved = false; - } else { - // Get the retention policy annotation, and check the value is RetentionPolicy.RUNTIME; - // FIXME asc invention required, implement this ! -// if (!annotationType.hasRuntimeRetention()) { -// ResolvedTypeX[] allAs = annotationType.getAnnotationTypes(); -// for (int i = 0; i < allAs.length; i++) { -// ResolvedTypeX ann = allAs[i]; -// if () -// } } } -- cgit v1.2.3