Author: peterreilly
Date: Mon Oct 24 08:09:47 2005
New Revision: 328081

URL: http://svn.apache.org/viewcvs?rev=328081&view=rev
Log:
bugzilla 37184: multiple calls to addlistener for introspection helper objects
reporter:  Frank Harnack

Modified:
    ant/core/trunk/CONTRIBUTORS
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/Project.java

Modified: ant/core/trunk/CONTRIBUTORS
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/CONTRIBUTORS?rev=328081&r1=328080&r2=328081&view=diff
==============================================================================
Binary files - no diff available.

Modified: ant/core/trunk/WHATSNEW
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=328081&r1=328080&r2=328081&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Oct 24 08:09:47 2005
@@ -147,6 +147,9 @@
 * <cvschangelog> was crashing with CVS versions >= 1.12.x due to change in
   the date format. Bugzilla report 30962.
 
+* The same IntrospectionHelper instance was contineously added as a listener
+  to project. Bugzilla report 37184.
+
 Other changes:
 --------------
 * Fixed references to obsoleted CVS web site. Burzilla Report 36854.

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Project.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?rev=328081&r1=328080&r2=328081&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Project.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Project.java Mon Oct 24 
08:09:47 2005
@@ -327,6 +327,10 @@
      *                 Must not be <code>null</code>.
      */
     public synchronized void addBuildListener(BuildListener listener) {
+        // If the listeners already has this listener, do nothing
+        if (listeners.contains(listener)) {
+            return;
+        }
         // create a new Vector to avoid ConcurrentModificationExc when
         // the listeners get added/removed while we are in fire
         Vector newListeners = getBuildListeners();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to