]> source.dussan.org Git - aspectj.git/commitdiff
tell Lint which warnings to suppress during specialization of this advice
authoracolyer <acolyer>
Wed, 17 Aug 2005 08:39:53 +0000 (08:39 +0000)
committeracolyer <acolyer>
Wed, 17 Aug 2005 08:39:53 +0000 (08:39 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java

index 859531650f76b3cff398170ede1bec0aaa326a01..4b08cd5d60f10f39c6bcf8c1219f5d8975311e5a 100644 (file)
@@ -96,7 +96,18 @@ public class BcelAdvice extends Advice {
                exposedState = new ExposedState(0);
                return;  //XXX this case is just here for supporting lazy test code
        }
+       
+       World world = shadow.getIWorld();
+       if (suppressedLintKinds == null) {
+               if (signature instanceof BcelMethod) {
+                       this.suppressedLintKinds = Utility.getSuppressedWarnings(signature.getAnnotations(), world.getLint());
+               } else {
+                       this.suppressedLintKinds = Collections.EMPTY_LIST;
+               }
+       }
+       world.getLint().suppressKinds(suppressedLintKinds);
                pointcutTest = getPointcut().findResidue(shadow, exposedState);
+               world.getLint().clearSuppressions();
                
                // these initializations won't be performed by findResidue, but need to be
                // so that the joinpoint is primed for weaving