diff --git a/src/main/org/apache/tools/ant/Project.java b/src/main/org/apache/tools/ant/Project.java index 360cef1dd..d5f130854 100644 --- a/src/main/org/apache/tools/ant/Project.java +++ b/src/main/org/apache/tools/ant/Project.java @@ -387,7 +387,7 @@ public class Project { * @param listener The listener to remove from the list. * Should not be null. */ - public void removeBuildListener(BuildListener listener) { + public synchronized void removeBuildListener(BuildListener listener) { // create a new Vector to avoid ConcurrentModificationExc when // the listeners get added/removed while we are in fire Vector newListeners = getBuildListeners();