Repository: ant-antlibs-antunit Updated Branches: refs/heads/master 7396c8b6a -> 7d62d95ab
create a copy to prevent problems if list is modified during iteration Project: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/repo Commit: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/commit/7d62d95a Tree: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/tree/7d62d95a Diff: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/diff/7d62d95a Branch: refs/heads/master Commit: 7d62d95ab3a3df61937d2f66ad07fa75ed61aa75 Parents: 7396c8b Author: Stefan Bodewig <[email protected]> Authored: Tue Mar 29 12:53:32 2016 +0200 Committer: Stefan Bodewig <[email protected]> Committed: Tue Mar 29 12:53:32 2016 +0200 ---------------------------------------------------------------------- src/main/org/apache/ant/antunit/LogCapturer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/blob/7d62d95a/src/main/org/apache/ant/antunit/LogCapturer.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/ant/antunit/LogCapturer.java b/src/main/org/apache/ant/antunit/LogCapturer.java index 5372b5b..85ce623 100644 --- a/src/main/org/apache/ant/antunit/LogCapturer.java +++ b/src/main/org/apache/ant/antunit/LogCapturer.java @@ -174,7 +174,8 @@ public class LogCapturer implements BuildListener { private String getLog(int minPriority, boolean mergeLines) { StringBuffer sb = new StringBuffer(); - for (Iterator/*<BuildEvent>*/ it = events.iterator(); it.hasNext(); ) { + for (Iterator/*<BuildEvent>*/ it = new LinkedList(events).iterator(); + it.hasNext(); ) { append(sb, (BuildEvent) it.next(), minPriority, mergeLines); } return sb.toString();
