summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/Lint.java2
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java13
2 files changed, 8 insertions, 7 deletions
diff --git a/weaver/src/org/aspectj/weaver/Lint.java b/weaver/src/org/aspectj/weaver/Lint.java
index f2542367c..6008c2eb4 100644
--- a/weaver/src/org/aspectj/weaver/Lint.java
+++ b/weaver/src/org/aspectj/weaver/Lint.java
@@ -100,7 +100,7 @@ public class Lint {
new Kind("uncheckedAdviceConversion","unchecked conversion when advice applied at shadow {0}, expected {1} but advice uses {2}");
public final Kind noGuardForLazyTjp =
- new Kind("noGuardForLazyTjp","can not build thisJoinPoint lazily for this advice since it has no suitable guard. The advice applies at {0}");
+ new Kind("noGuardForLazyTjp","can not build thisJoinPoint lazily for this advice since it has no suitable guard");
public final Kind noExplicitConstructorCall =
new Kind("noExplicitConstructorCall","inter-type constructor does not contain explicit constructor call: field initializers in the target type will not be executed");
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
index 7691136e8..6823e3339 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
@@ -23,7 +23,6 @@ import org.aspectj.apache.bcel.generic.InstructionConstants;
import org.aspectj.apache.bcel.generic.InstructionFactory;
import org.aspectj.apache.bcel.generic.InstructionHandle;
import org.aspectj.apache.bcel.generic.InstructionList;
-import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.Message;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind;
@@ -56,6 +55,7 @@ public class BcelAdvice extends Advice {
private ExposedState exposedState;
private boolean hasMatchedAtLeastOnce = false;
+ private boolean hasReportedNoGuardForLazyTJP = false;
public BcelAdvice(
AjAttribute.AdviceAttribute attribute,
@@ -156,13 +156,14 @@ public class BcelAdvice extends Advice {
// collect up the problematic advice
((BcelShadow)shadow).addAdvicePreventingLazyTjp(this);
}
- if (!isAround && !hasGuardTest && world.getLint().noGuardForLazyTjp.isEnabled()) {
+ if (!hasReportedNoGuardForLazyTJP && !isAround && !hasGuardTest && world.getLint().noGuardForLazyTjp.isEnabled()) {
// can't build tjp lazily, no suitable test...
+ // ... only want to record it once against the advice(bug 133117)
world.getLint().noGuardForLazyTjp.signal(
- new String[] {shadow.toString()},
- getSourceLocation(),
- new ISourceLocation[] { ((BcelShadow)shadow).getSourceLocation() }
- );
+ "",
+ getSourceLocation()
+ );
+ hasReportedNoGuardForLazyTJP = true;
}
}