From: acolyer Date: Tue, 16 Aug 2005 09:28:24 +0000 (+0000) Subject: implementation of parameterize with X-Git-Tag: V1_5_0M3~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=95a55cddfee7b47c9ac6f9a0ab9a57b80affa598;p=aspectj.git implementation of parameterize with --- diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclareSoft.java b/weaver/src/org/aspectj/weaver/patterns/DeclareSoft.java index 6e5da128e..c9a668e0d 100644 --- a/weaver/src/org/aspectj/weaver/patterns/DeclareSoft.java +++ b/weaver/src/org/aspectj/weaver/patterns/DeclareSoft.java @@ -38,8 +38,12 @@ public class DeclareSoft extends Declare { } public Declare parameterizeWith(Map typeVariableBindingMap) { - // TODO Auto-generated method stub - return this; + DeclareSoft ret = + new DeclareSoft( + exception.parameterizeWith(typeVariableBindingMap), + pointcut.parameterizeWith(typeVariableBindingMap)); + ret.copyLocationFrom(this); + return ret; } public String toString() { @@ -96,6 +100,10 @@ public class DeclareSoft extends Declare { exception = exception.resolveBindings(scope, null, false, true); ResolvedType excType = exception.getExactType().resolve(scope.getWorld()); if (excType != ResolvedType.MISSING) { + if (excType.isTypeVariableReference()) { + // a declare soft in a generic abstract aspect, we need to check the upper bound + excType = excType.getUpperBound().resolve(scope.getWorld()); + } if (!scope.getWorld().getCoreType(UnresolvedType.THROWABLE).isAssignableFrom(excType)) { scope.getWorld().showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.NOT_THROWABLE,excType.getName()),