aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authoraclement <aclement>2008-10-30 19:10:25 +0000
committeraclement <aclement>2008-10-30 19:10:25 +0000
commit373b1e2679258c9f8abdcebe73d1e13e68346671 (patch)
treef47f66585c1aa1e01de72a3dba20be50230a54ea /org.aspectj.matcher
parent9272f7aaa5401f5b7c8ee62be6750cc5c249338a (diff)
downloadaspectj-373b1e2679258c9f8abdcebe73d1e13e68346671.tar.gz
aspectj-373b1e2679258c9f8abdcebe73d1e13e68346671.zip
fix for 163005
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/Checker.java2
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/Lint.java4
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/Shadow.java5
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java8
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/XlintDefault.properties3
5 files changed, 17 insertions, 5 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java b/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
index 7505d12e5..a2d8dc262 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
@@ -72,7 +72,7 @@ public class Checker extends ShadowMunger {
/**
* Not supported for a Checker
*/
- public void implementOn(Shadow shadow) {
+ public boolean implementOn(Shadow shadow) {
throw new RuntimeException("illegal state");
}
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java b/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
index 162c03e7e..4c4f5f7dd 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
@@ -126,6 +126,10 @@ public class Lint {
"mustWeaveXmlDefinedAspects",
"XML Defined aspects must be woven in cases where cflow pointcuts are involved. Currently the include/exclude patterns exclude ''{0}''");
+ public final Kind cannotAdviseJoinpointInInterfaceWithAroundAdvice = new Kind(
+ "cannotAdviseJoinpointInInterfaceWithAroundAdvice",
+ "The joinpoint ''{0}'' cannot be advised and is being skipped as the compiler implementation will lead to creation of methods with bodies in an interface (compiler limitation)");
+
/**
* Indicates an aspect could not be found when attempting reweaving.
*/
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/Shadow.java b/org.aspectj.matcher/src/org/aspectj/weaver/Shadow.java
index edc8fd121..b9132b898 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/Shadow.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/Shadow.java
@@ -610,8 +610,9 @@ public abstract class Shadow {
World world = getIWorld();
for (Iterator iter = mungers.iterator(); iter.hasNext();) {
ShadowMunger munger = (ShadowMunger) iter.next();
- munger.implementOn(this);
- world.reportMatch(munger, this);
+ if (munger.implementOn(this)) {
+ world.reportMatch(munger, this);
+ }
}
}
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java b/org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java
index bc6e3982c..9b6dc7dd4 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java
@@ -54,7 +54,13 @@ public abstract class ShadowMunger implements PartialOrder.PartialComparable, IH
public abstract void specializeOn(Shadow shadow);
- public abstract void implementOn(Shadow shadow);
+ /**
+ * Implement this munger at the specified shadow, returning a boolean to indicate success.
+ *
+ * @param shadow the shadow where this munger should be applied
+ * @return true if the munger was successful
+ */
+ public abstract boolean implementOn(Shadow shadow);
/**
* All overriding methods should call super
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/XlintDefault.properties b/org.aspectj.matcher/src/org/aspectj/weaver/XlintDefault.properties
index f88f24e7a..c07f272a7 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/XlintDefault.properties
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/XlintDefault.properties
@@ -44,4 +44,5 @@ calculatingSerialVersionUID=ignore
advisingSynchronizedMethods=warning
mustWeaveXmlDefinedAspects=warning
-missingAspectForReweaving=error \ No newline at end of file
+missingAspectForReweaving=error
+cannotAdviseJoinpointInInterfaceWithAroundAdvice=warning \ No newline at end of file