]> source.dussan.org Git - aspectj.git/commitdiff
from branch: check exceptions if necessary
authoraclement <aclement>
Tue, 19 Apr 2005 12:36:50 +0000 (12:36 +0000)
committeraclement <aclement>
Tue, 19 Apr 2005 12:36:50 +0000 (12:36 +0000)
weaver/src/org/aspectj/weaver/Shadow.java

index 07e32fc2390dd2282c50588a3964cd1a479a7282..5124e69c48adfdc04f12869e6f422aa171a136dc 100644 (file)
@@ -304,12 +304,20 @@ public abstract class Shadow {
                        throw new BCException("unknown kind: " + key);
                }               
        }
-       
+
+    /**
+     * Only does the check if the munger requires it (@AJ aspects don't)
+     *
+     * @param munger
+     * @return
+     */
        protected boolean checkMunger(ShadowMunger munger) {
-               for (Iterator i = munger.getThrownExceptions().iterator(); i.hasNext(); ) {
-                       if (!checkCanThrow(munger,  (ResolvedTypeX)i.next() )) return false;
-               }
-               return true;
+        if (munger.mustCheckExceptions()) {
+            for (Iterator i = munger.getThrownExceptions().iterator(); i.hasNext(); ) {
+                if (!checkCanThrow(munger,  (ResolvedTypeX)i.next() )) return false;
+            }
+        }
+        return true;
        }
 
        protected boolean checkCanThrow(ShadowMunger munger, ResolvedTypeX resolvedTypeX) {
@@ -457,7 +465,8 @@ public abstract class Shadow {
                ak.getKey()==AdviceKind.PerThisEntry.getKey() ||
                ak.getKey()==AdviceKind.PerTargetEntry.getKey() ||
                ak.getKey()==AdviceKind.Softener.getKey()) {
-                         System.err.println("Dont want a message about this: "+ak);
+        //FIXME: Alex: why this System.err was there ?? It prints nasty thing in my LTW. 
+          System.err.println("Dont want a message about this: "+ak);
                          return null;
                }
                throw new RuntimeException("Shadow.determineRelKind: What the hell is it? "+ak);