]> source.dussan.org Git - aspectj.git/commitdiff
fix for 163005
authoraclement <aclement>
Thu, 30 Oct 2008 19:10:25 +0000 (19:10 +0000)
committeraclement <aclement>
Thu, 30 Oct 2008 19:10:25 +0000 (19:10 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/Checker.java
org.aspectj.matcher/src/org/aspectj/weaver/Lint.java
org.aspectj.matcher/src/org/aspectj/weaver/Shadow.java
org.aspectj.matcher/src/org/aspectj/weaver/ShadowMunger.java
org.aspectj.matcher/src/org/aspectj/weaver/XlintDefault.properties

index 7505d12e57149714c9933cd8874928ae88d4dacd..a2d8dc26213df517392d95c7897838d39b42aab7 100644 (file)
@@ -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");
        }
 
index 162c03e7e372cf7073259ca7b8f03b1bb2e3fc90..4c4f5f7ddc82c263dfc78c552f277c985a73ffe5 100644 (file)
@@ -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.
         */
index edc8fd121013b36fe92f76a58a3fb23a038902b7..b9132b89844525182c1214a2911123ace4c08ae0 100644 (file)
@@ -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);
+                       }
                }
        }
 
index bc6e3982caa2d79a465645747bd394be8989a00d..9b6dc7dd4d89e54e6b91dd65148b49c5e2c24b7b 100644 (file)
@@ -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
index f88f24e7ad474c36bac8c4d54d6b302575f9b4b6..c07f272a71725b26e7e5ee9689465a4256bc97fb 100644 (file)
@@ -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