From 985947987e77d5f4aafc8fc74f9e2c9fd9e4bf21 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 28 Aug 2008 02:16:37 +0000 Subject: [PATCH] fix concurrentmod exception --- .../src/org/aspectj/weaver/bcel/LazyMethodGen.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index ac96c39a8..433a213f8 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -1093,13 +1093,11 @@ public final class LazyMethodGen implements Traceable { if (inst instanceof InstructionBranch) { branchInstructions.add(iHandle); } - Iterator tIter = iHandle.getTargeters().iterator(); - while (tIter.hasNext()) { -// InstructionTargeter[] targeters = iHandle.getTargetersArray(); -// if (targeters != null) { -// for (int k = targeters.length - 1; k >= 0; k--) { - InstructionTargeter targeter = (InstructionTargeter)tIter.next();//targeters[k]; + InstructionTargeter[] targeters = iHandle.getTargetersArray(); + if (targeters != null) { + for (int k = targeters.length - 1; k >= 0; k--) { + InstructionTargeter targeter = targeters[k]; if (targeter instanceof LineNumberTag) { int line = ((LineNumberTag)targeter).getLineNumber(); if (line != currLine) { @@ -1118,7 +1116,7 @@ public final class LazyMethodGen implements Traceable { } else { p.end = iHandle; } -// } + } } } } -- 2.39.5