From: aclement Date: Tue, 19 Apr 2005 12:36:50 +0000 (+0000) Subject: from branch: check exceptions if necessary X-Git-Tag: PRE_ANDY~483 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bbaf5ab3c6af380e43920e6e38de0d3f0323a546;p=aspectj.git from branch: check exceptions if necessary --- diff --git a/weaver/src/org/aspectj/weaver/Shadow.java b/weaver/src/org/aspectj/weaver/Shadow.java index 07e32fc23..5124e69c4 100644 --- a/weaver/src/org/aspectj/weaver/Shadow.java +++ b/weaver/src/org/aspectj/weaver/Shadow.java @@ -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);