diff options
author | aclement <aclement> | 2011-12-15 01:26:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-12-15 01:26:36 +0000 |
commit | 7a25c049fab85b86baf081e9d2380c4f7de5da5e (patch) | |
tree | c1674e516411d34a0e9de91d82fc19450706bc73 /weaver | |
parent | 13475b2ce5f6ebdfd9656ca7a5b40c2d28d5c4d7 (diff) | |
download | aspectj-7a25c049fab85b86baf081e9d2380c4f7de5da5e.tar.gz aspectj-7a25c049fab85b86baf081e9d2380c4f7de5da5e.zip |
where to do the work for handler+multicatch
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java index 0cfc4cf08..a6f2c0fe6 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java @@ -2682,6 +2682,7 @@ class BcelClassWeaver implements IClassWeaver { // Exception handlers (pr230817) if (canMatch(Shadow.ExceptionHandler) && !Range.isRangeHandle(ih)) { Set<InstructionTargeter> targeters = ih.getTargetersCopy(); + // If in Java7 there may be overlapping exception ranges for multi catch - we should recognize that for (InstructionTargeter t : targeters) { if (t instanceof ExceptionRange) { // assert t.getHandler() == ih @@ -2692,18 +2693,14 @@ class BcelClassWeaver implements IClassWeaver { if (isInitFailureHandler(ih)) { return; } - if (!ih.getInstruction().isStoreInstruction() && ih.getInstruction().getOpcode() != Constants.NOP) { // If using cobertura, the catch block stats with - // INVOKESTATIC rather than ASTORE, in order that - // the - // ranges + // INVOKESTATIC rather than ASTORE, in order that the ranges // for the methodcall and exceptionhandler shadows // that occur at this same // line, we need to modify the instruction list to // split them - adding a - // NOP before the invokestatic that gets all the - // targeters + // NOP before the invokestatic that gets all the targeters // that were aimed at the INVOKESTATIC mg.getBody().insert(ih, InstructionConstants.NOP); InstructionHandle newNOP = ih.getPrev(); @@ -3109,7 +3106,7 @@ class BcelClassWeaver implements IClassWeaver { && s.charAt(4) == 'a' && (s.equals("org.aspectj.runtime.internal.CFlowCounter") || s.equals("org.aspectj.runtime.internal.CFlowStack") || s - .equals("org.aspectj.runtime.reflect.Factory"))) { + .equals("org.aspectj.runtime.reflect.Factory"))) { proceed = false; } else { if (methodName.equals("aspectOf")) { |