diff options
author | aclement <aclement> | 2005-04-19 12:36:50 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-04-19 12:36:50 +0000 |
commit | bbaf5ab3c6af380e43920e6e38de0d3f0323a546 (patch) | |
tree | c9928a34dc2ea41de9a93e02cceb3ba7c6ab8227 /weaver | |
parent | e3cfca7e4d8f1e72b2ebb7e669eb440a3426df66 (diff) | |
download | aspectj-bbaf5ab3c6af380e43920e6e38de0d3f0323a546.tar.gz aspectj-bbaf5ab3c6af380e43920e6e38de0d3f0323a546.zip |
from branch: check exceptions if necessary
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Shadow.java | 21 |
1 files changed, 15 insertions, 6 deletions
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); |