]> source.dussan.org Git - aspectj.git/commitdiff
test and fix for 168982: message on ataspectj nonabstract generic aspect
authoraclement <aclement>
Wed, 11 Jun 2008 22:30:12 +0000 (22:30 +0000)
committeraclement <aclement>
Wed, 11 Jun 2008 22:30:12 +0000 (22:30 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java

index 6008b8e936a96b612aa224e0b842d9b26f839a1f..eade0721bb02c9ad43b0bb38c31be8eca7db56d2 100644 (file)
@@ -14,6 +14,7 @@
 package org.aspectj.weaver.bcel;
 
 import java.io.PrintStream;
+import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -33,6 +34,7 @@ import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePairGen;
 import org.aspectj.apache.bcel.classfile.annotation.ElementValueGen;
 import org.aspectj.apache.bcel.classfile.annotation.EnumElementValueGen;
 import org.aspectj.bridge.IMessageHandler;
+import org.aspectj.bridge.MessageUtil;
 import org.aspectj.weaver.AbstractReferenceTypeDelegate;
 import org.aspectj.weaver.AjAttribute;
 import org.aspectj.weaver.AjcMemberMaker;
@@ -338,6 +340,9 @@ public class BcelObjectType extends AbstractReferenceTypeDelegate {
                        // we can finally process the aspect and its associated perclause...
                        perClause = deferredAspectAttribute.reifyFromAtAspectJ(this.getResolvedTypeX());
                }
+               if (isAspect() && !Modifier.isAbstract(getModifiers()) && isGeneric()) {
+                       msgHandler.handleMessage(MessageUtil.error("The generic aspect '"+getResolvedTypeX().getName()+"' must be declared abstract",getResolvedTypeX().getSourceLocation()));
+               }
 
        }