From: aclement Date: Tue, 18 Dec 2007 15:46:05 +0000 (+0000) Subject: 166647 changed the error message to a lint X-Git-Tag: V1_5_4~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=489f36454f3d81f4c14729ec243e782aa31aa3a2;p=aspectj.git 166647 changed the error message to a lint --- diff --git a/weaver/src/org/aspectj/weaver/Lint.java b/weaver/src/org/aspectj/weaver/Lint.java index 1dcf127d7..178995159 100644 --- a/weaver/src/org/aspectj/weaver/Lint.java +++ b/weaver/src/org/aspectj/weaver/Lint.java @@ -128,6 +128,9 @@ public class Lint { public final Kind advisingSynchronizedMethods = new Kind("advisingSynchronizedMethods", "advice matching the synchronized method shadow ''{0}'' will be executed outside the lock rather than inside (compiler limitation)"); + public final Kind mustWeaveXmlDefinedAspects = new Kind("mustWeaveXmlDefinedAspects", + "XML Defined aspects must be woven in cases where cflow pointcuts are involved. Currently the include/exclude patterns exclude ''{0}''"); + private static Trace trace = TraceFactory.getTraceFactory().getTrace(Lint.class); public Lint(World world) { diff --git a/weaver/src/org/aspectj/weaver/XlintDefault.properties b/weaver/src/org/aspectj/weaver/XlintDefault.properties index e10fa4797..6a735adb1 100644 --- a/weaver/src/org/aspectj/weaver/XlintDefault.properties +++ b/weaver/src/org/aspectj/weaver/XlintDefault.properties @@ -41,4 +41,5 @@ cantFindTypeAffectingJPMatch = warning unorderedAdviceAtShadow=ignore swallowedExceptionInCatchBlock=ignore calculatingSerialVersionUID=ignore -advisingSynchronizedMethods=warning \ No newline at end of file +advisingSynchronizedMethods=warning +mustWeaveXmlDefinedAspects=warning \ No newline at end of file diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java index 74654136b..ff2457625 100644 --- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java +++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java @@ -262,7 +262,9 @@ public class WeavingAdaptor implements IMessageContext { bytes = getWovenBytes(name, bytes); } else if (shouldWeaveAnnotationStyleAspect(name, bytes)) { if (mustWeave) { - error("XML Defined aspects must be woven in cases where cflow pointcuts are involved. Currently the include/exclude patterns exclude '"+name+"'"); + if (bcelWorld.getLint().mustWeaveXmlDefinedAspects.isEnabled()) { + bcelWorld.getLint().mustWeaveXmlDefinedAspects.signal(name,null); + } } // an @AspectJ aspect needs to be at least munged by the aspectOf munger debug("weaving '" + name + "'");