You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2018/05/14 12:13:09 UTC
ant-antlibs-antunit git commit: Avoid potential thread safety issues
in LogCapturer
Repository: ant-antlibs-antunit
Updated Branches:
refs/heads/master e22525b32 -> 2014f42d7
Avoid potential thread safety issues in LogCapturer
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/2014f42d
Tree: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/tree/2014f42d
Diff: http://git-wip-us.apache.org/repos/asf/ant-antlibs-antunit/diff/2014f42d
Branch: refs/heads/master
Commit: 2014f42d7e9c9b352ee381a67e89ec0d35b98acb
Parents: e22525b
Author: Jaikiran Pai <ja...@gmail.com>
Authored: Mon May 14 11:13:26 2018 +0530
Committer: Jaikiran Pai <ja...@gmail.com>
Committed: Mon May 14 11:13:26 2018 +0530
----------------------------------------------------------------------
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/2014f42d/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 3dee342..601defb 100644
--- a/src/main/org/apache/ant/antunit/LogCapturer.java
+++ b/src/main/org/apache/ant/antunit/LogCapturer.java
@@ -23,6 +23,7 @@ package org.apache.ant.antunit;
import java.util.Iterator;
import java.util.List;
import java.util.LinkedList;
+import java.util.Collections;
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildListener;
@@ -40,7 +41,7 @@ import org.apache.tools.ant.util.StringUtils;
public class LogCapturer implements BuildListener {
public static final String REFERENCE_ID = "ant.antunit.log";
- private List/*<BuildEvent>*/ events = new LinkedList();
+ private List/*<BuildEvent>*/ events = Collections.synchronizedList(new LinkedList());
private Project p;
public LogCapturer(Project p) {