Index: src/org/aspectj/weaver/bcel/BcelWeaver.java =================================================================== RCS file: /home/technology/org.aspectj/modules/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java,v retrieving revision 1.53 diff -u -r1.53 BcelWeaver.java --- src/org/aspectj/weaver/bcel/BcelWeaver.java 17 May 2005 08:29:18 -0000 1.53 +++ src/org/aspectj/weaver/bcel/BcelWeaver.java 9 Jun 2005 13:21:17 -0000 @@ -1016,7 +1029,14 @@ // if a piece of advice hasn't matched anywhere and we are in -1.5 mode, put out a warning if (world.behaveInJava5Way && world.getLint().adviceDidNotMatch.isEnabled()) { + + + + List l = world.getCrosscuttingMembersSet().getShadowMungers(); + + List linesFilesNotMatched = new ArrayList(); // hack to fix bug 99136 + for (Iterator iter = l.iterator(); iter.hasNext();) { ShadowMunger element = (ShadowMunger) iter.next(); if (element instanceof BcelAdvice) { // This will stop us incorrectly reporting deow Checkers @@ -1024,15 +1044,38 @@ if (!ba.hasMatchedSomething()) { // Because we implement some features of AJ itself by creating our own kind of mungers, you sometimes // find that ba.getSignature() is not a BcelMethod - for example it might be a cflow entry munger. - if (ba.getSignature()!=null) { - if (!(ba.getSignature() instanceof BcelMethod) - || !Utility.isSuppressing((AnnotationX[])ba.getSignature().getAnnotations(),"adviceDidNotMatch")) { - world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(),element.getSourceLocation()); - } - } + + if (ba.getSignature()!=null) { + + boolean alreadyHad = false; + for (Iterator i = linesFilesNotMatched.iterator();i.hasNext();){ + Integer lineNum = (Integer)i.next(); + TypeX declaringAspect = (TypeX)i.next(); + if (ba.getSourceLocation().getLine() == lineNum.intValue() + && ba.getDeclaringAspect() == declaringAspect){ + alreadyHad = true; + break; + } + } + + + if (!alreadyHad){ // fixing bug 99136 + + if (!(ba.getSignature() instanceof BcelMethod) + || !Utility.isSuppressing((AnnotationX[])ba.getSignature().getAnnotations(),"adviceDidNotMatch")) { + world.getLint().adviceDidNotMatch.signal(ba.getDeclaringAspect().toString(),element.getSourceLocation()); + + linesFilesNotMatched.add(new Integer(ba.getSourceLocation().getLine())); // ajh02 + linesFilesNotMatched.add(ba.getDeclaringAspect()); + } + + } + + } } } } + } requestor.weaveCompleted();