From bc04401627101ce037a5e90852e36baacdab2873 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 11 Jun 2008 22:30:12 +0000 Subject: [PATCH] test and fix for 168982: message on ataspectj nonabstract generic aspect --- weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java b/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java index 6008b8e93..eade0721b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java @@ -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())); + } } -- 2.39.5