From 14a2ae019e75aba654641183fbb20e3c05711975 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 5 Jan 2005 16:44:06 +0000 Subject: [PATCH] BWD: One extra check. --- weaver/src/org/aspectj/weaver/patterns/DeclareParents.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java b/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java index 3adcd722a..abb93d4b4 100644 --- a/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java +++ b/weaver/src/org/aspectj/weaver/patterns/DeclareParents.java @@ -196,7 +196,8 @@ public class DeclareParents extends Declare { return null; } - + if (parentType.isAssignableFrom(targetType)) return null; // already a parent + if (targetType.isAssignableFrom(parentType)) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.CANT_EXTEND_SELF,targetType.getName()), -- 2.39.5