From: jhugunin Date: Tue, 21 Jan 2003 19:01:43 +0000 (+0000) Subject: fix for Bugzilla Bug 29689 X-Git-Tag: V_1_1_b5~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d2b603683edc8747eebdb4d106c205dd9433da9f;p=aspectj.git fix for Bugzilla Bug 29689 Declare precedence should not allow multiple * patterns --- diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java b/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java index 837bbc7ce..cf0ff8d1a 100644 --- a/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java +++ b/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java @@ -65,10 +65,19 @@ public class DeclarePrecedence extends Declare { public void resolve(IScope scope) { patterns = patterns.resolveBindings(scope, Bindings.NONE, false, false); + boolean seenStar = false; for (int i=0; i < patterns.size(); i++) { TypePattern pi = patterns.get(i); - if (pi.isStar()) continue; + if (pi.isStar()) { + if (seenStar) { + scope.getWorld().showMessage(IMessage.ERROR, + "circularity in declare dominates, '*' occurs more than once", + pi.getSourceLocation(), null); + } + seenStar = true; + continue; + } ResolvedTypeX exactType = pi.getExactType().resolve(scope.getWorld()); if (exactType == ResolvedTypeX.MISSING) continue; for (int j=0; j < patterns.size(); j++) {