]> source.dussan.org Git - aspectj.git/commitdiff
fix for pr120693
authoracolyer <acolyer>
Tue, 13 Dec 2005 21:04:36 +0000 (21:04 +0000)
committeracolyer <acolyer>
Tue, 13 Dec 2005 21:04:36 +0000 (21:04 +0000)
weaver/src/org/aspectj/weaver/Lint.java
weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java

index 92dc373c53e3160611d6554f0991d560f2c9e66e..ef025d693805b58fe62c31b863804b4b0f0131fb 100644 (file)
@@ -198,12 +198,19 @@ public class Lint {
        }
        
        // remove any suppression of lint warnings in place
-       public void clearSuppressions() {
+       public void clearAllSuppressions() {
                for (Iterator iter = kinds.values().iterator(); iter.hasNext();) {
                        Kind k = (Kind) iter.next();
                        k.setSuppressed(false);
                }               
        }
+       
+       public void clearSuppressions(Collection lintKind) {
+               for (Iterator iter = lintKind.iterator(); iter.hasNext();) {
+                       Kind k = (Kind) iter.next();
+                       k.setSuppressed(false);
+               }
+       }
 
        private IMessage.Kind getMessageKind(String v) {
                if (v.equals("ignore")) return null;
index f18506e258c34d66bee78506fb96d6b714478118..e6f0d88c8a87d95d9b34672f4d0556362e8f3a87 100644 (file)
@@ -82,7 +82,7 @@ public class BcelAdvice extends Advice {
        public ShadowMunger concretize(ResolvedType fromType, World world, PerClause clause) {
                suppressLintWarnings(world);
                ShadowMunger ret = super.concretize(fromType, world, clause);
-               clearLintSuppressions(world);
+               clearLintSuppressions(world,this.suppressedLintKinds);
                return ret;
        }
        
@@ -102,7 +102,7 @@ public class BcelAdvice extends Advice {
        public boolean match(Shadow shadow, World world) {
                suppressLintWarnings(world);
                boolean ret = super.match(shadow, world);
-               clearLintSuppressions(world);
+               clearLintSuppressions(world,this.suppressedLintKinds);
                return ret;
        }
        
@@ -130,7 +130,7 @@ public class BcelAdvice extends Advice {
        World world = shadow.getIWorld();
        suppressLintWarnings(world);
                pointcutTest = getPointcut().findResidue(shadow, exposedState);
-               clearLintSuppressions(world);
+               clearLintSuppressions(world,this.suppressedLintKinds);
                
                // these initializations won't be performed by findResidue, but need to be
                // so that the joinpoint is primed for weaving
@@ -629,7 +629,7 @@ public class BcelAdvice extends Advice {
        inWorld.getLint().suppressKinds(suppressedLintKinds);
        }
        
-       protected void clearLintSuppressions(World inWorld) {
-               inWorld.getLint().clearSuppressions();
+       protected void clearLintSuppressions(World inWorld,Collection toClear) {
+               inWorld.getLint().clearSuppressions(toClear);
        }
 }