]> source.dussan.org Git - aspectj.git/commitdiff
fix for Bugzilla Bug 44272
authoracolyer <acolyer>
Mon, 15 Mar 2004 17:27:56 +0000 (17:27 +0000)
committeracolyer <acolyer>
Mon, 15 Mar 2004 17:27:56 +0000 (17:27 +0000)
  retitle warning to "circular {advice} dependency at ..."

tests/ajcTests.xml
tests/bugs/CircularAdvicePrecedence.java [new file with mode: 0644]
weaver/src/org/aspectj/weaver/Shadow.java
weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java

index 2a5ab1733e7151fa5a355fb6abf31a77569330db..d14bd19bd2c8c0cdb8319865b870baead473211b 100644 (file)
             <message kind="warning" line="6"/>
         </compile>
     </ajc-test>
+    
+      <ajc-test dir="bugs" pr="44272"
+               title="retitle warning to circular {advice} dependency at ...">
+        <compile files="CircularAdvicePrecedence.java">
+            <message kind="error" line="4"/> 
+            <message kind="error" line="5"/> 
+            <message kind="error" line="6"/> 
+        </compile>
+    </ajc-test>
 </suite>
diff --git a/tests/bugs/CircularAdvicePrecedence.java b/tests/bugs/CircularAdvicePrecedence.java
new file mode 100644 (file)
index 0000000..99313c7
--- /dev/null
@@ -0,0 +1,13 @@
+// bug 44272
+public aspect CircularAdvicePrecedence {
+    pointcut crun() : execution (void run()) ;
+    before() : crun() {}
+    after() returning : crun() {}
+    void around() : crun() { proceed(); }
+}
+
+class Runner {
+       
+       public void run() {}
+       
+}
\ No newline at end of file
index 266c8b4db7b74c50f231eb9c006dfd5adb62b699..cd21801c7b2bce8cf6b69846a57222c5d30537c5 100644 (file)
@@ -332,7 +332,7 @@ public abstract class Shadow {
                        for (Iterator i = mungers.iterator(); i.hasNext(); ) {
                                ShadowMunger m = (ShadowMunger)i.next();
                                getIWorld().getMessageHandler().handleMessage(
-                                       MessageUtil.error("circular dependency at " + this, m.getSourceLocation()));
+                                       MessageUtil.error("circular advice dependency at " + this, m.getSourceLocation()));
                        }
                }
                mungers = sorted;
index dd6598388a2326505d3c5665ecb20754f0c08e5b..4106abbc4e858b344af390073b0fde157688428c 100644 (file)
@@ -74,7 +74,7 @@ public class DeclarePrecedence extends Declare {
                if (pi.isStar()) {
                        if (seenStar) {
                                scope.getWorld().showMessage(IMessage.ERROR,
-                                       "circularity in declare dominates, '*' occurs more than once",
+                                       "circularity in declare precedence, '*' occurs more than once",
                                        pi.getSourceLocation(), null);                                  
                        }
                        seenStar = true;
@@ -88,7 +88,7 @@ public class DeclarePrecedence extends Declare {
                        if (pj.isStar()) continue;
                        if (pj.matchesStatically(exactType)) {
                                scope.getWorld().showMessage(IMessage.ERROR,
-                                       "circularity in declare dominates, '" + exactType.getName() + 
+                                       "circularity in declare precedence, '" + exactType.getName() + 
                                                "' matches two patterns", pi.getSourceLocation(), pj.getSourceLocation());
                        }
                }