aboutsummaryrefslogtreecommitdiffstats
path: root/weaver/src
diff options
context:
space:
mode:
authoraclement <aclement>2004-07-26 13:28:20 +0000
committeraclement <aclement>2004-07-26 13:28:20 +0000
commit75852d7b1915cddfd4ba3dea272324617abdaa60 (patch)
tree231cf9096df98e90fc7f671fc7c52cc7b1a84c6f /weaver/src
parentad6d6f62831e62589cfe6dbb5ccac3b3fbb2acf0 (diff)
downloadaspectj-75852d7b1915cddfd4ba3dea272324617abdaa60.tar.gz
aspectj-75852d7b1915cddfd4ba3dea272324617abdaa60.zip
Fix for Bug 70619
compiler aborts with "conflicting dominates orders" with circular declare precedences
Diffstat (limited to 'weaver/src')
-rw-r--r--weaver/src/org/aspectj/weaver/World.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java
index 0d019fd1c..6da90ebca 100644
--- a/weaver/src/org/aspectj/weaver/World.java
+++ b/weaver/src/org/aspectj/weaver/World.java
@@ -300,13 +300,22 @@ public abstract class World {
//??? number of dominates declares in the whole system.
//??? This method can be called a large number of times.
int order = 0;
+ DeclarePrecedence orderer = null; // Records the declare precedence statement that gives the first ordering
for (Iterator i = crosscuttingMembersSet.getDeclareDominates().iterator(); i.hasNext(); ) {
DeclarePrecedence d = (DeclarePrecedence)i.next();
int thisOrder = d.compare(aspect1, aspect2);
//System.out.println("comparing: " + thisOrder + ": " + d);
if (thisOrder != 0) {
+ if (orderer==null) orderer = d;
if (order != 0 && order != thisOrder) {
- throw new BCException("conflicting dominates orders");
+ ISourceLocation[] isls = new ISourceLocation[2];
+ isls[0]=orderer.getSourceLocation();
+ isls[1]=d.getSourceLocation();
+ Message m =
+ new Message("conflicting declare precedence orderings for aspects: "+
+ aspect1.getName()+" and "+aspect2.getName(),null,true,isls);
+ messageHandler.handleMessage(m);
+ // throw new BCException("conflicting dominates orders"+d.getSourceLocation());
} else {
order = thisOrder;
}