aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-03-15 17:27:56 +0000
committeracolyer <acolyer>2004-03-15 17:27:56 +0000
commit01095341153b24fcf5ab5f537ecc77077819b1f1 (patch)
treefdb1eb96ddc1751bc999d350785bfc840c1172c8
parent0c2aca0df707e4ac1d8f83aee8eaaa47b982a40d (diff)
downloadaspectj-01095341153b24fcf5ab5f537ecc77077819b1f1.tar.gz
aspectj-01095341153b24fcf5ab5f537ecc77077819b1f1.zip
fix for Bugzilla Bug 44272
retitle warning to "circular {advice} dependency at ..."
-rw-r--r--tests/ajcTests.xml9
-rw-r--r--tests/bugs/CircularAdvicePrecedence.java13
-rw-r--r--weaver/src/org/aspectj/weaver/Shadow.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java4
4 files changed, 25 insertions, 3 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 2a5ab1733..d14bd19bd 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -7294,4 +7294,13 @@
<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
index 000000000..99313c752
--- /dev/null
+++ b/tests/bugs/CircularAdvicePrecedence.java
@@ -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
diff --git a/weaver/src/org/aspectj/weaver/Shadow.java b/weaver/src/org/aspectj/weaver/Shadow.java
index 266c8b4db..cd21801c7 100644
--- a/weaver/src/org/aspectj/weaver/Shadow.java
+++ b/weaver/src/org/aspectj/weaver/Shadow.java
@@ -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;
diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java b/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java
index dd6598388..4106abbc4 100644
--- a/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java
+++ b/weaver/src/org/aspectj/weaver/patterns/DeclarePrecedence.java
@@ -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());
}
}