ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Project.java
Date Wed, 05 Jun 2002 06:37:58 GMT
conor       2002/06/04 23:37:58

  Modified:    .        Tag: ANT_15_BRANCH WHATSNEW
               src/main/org/apache/tools/ant Tag: ANT_15_BRANCH
                        Project.java
  Log:
  Change getBuildListeners to return a cloned Vector
  PR:	9609
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.263.2.30 +10 -0     jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.263.2.29
  retrieving revision 1.263.2.30
  diff -u -w -u -r1.263.2.29 -r1.263.2.30
  --- WHATSNEW	31 May 2002 23:01:29 -0000	1.263.2.29
  +++ WHATSNEW	5 Jun 2002 06:37:57 -0000	1.263.2.30
  @@ -1,3 +1,13 @@
  +Changes from Ant 1.5 to current CVS 1.5 Branch
  +==============================================
  +Changes that could break older environments:
  +--------------------------------------------
  +* Project.getBuildListeners now returns a clone of the listener list. Changes to 
  +  the returned list will not affect the listeners currently attached to the 
  +  Project. It also means that it is safe to iterate over the returned list
  +  if listeners are added or removed during the traversal.
  +
  +
   Changes from Ant 1.5beta1 to Ant 1.5beta2
   =========================================
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.108.2.3 +3 -4      jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.108.2.2
  retrieving revision 1.108.2.3
  diff -u -w -u -r1.108.2.2 -r1.108.2.3
  --- Project.java	30 May 2002 02:56:23 -0000	1.108.2.2
  +++ Project.java	5 Jun 2002 06:37:57 -0000	1.108.2.3
  @@ -83,7 +83,7 @@
    *
    * @author duncan@x180.com
    *
  - * @version $Revision: 1.108.2.2 $
  + * @version $Revision: 1.108.2.3 $
    */
   
   public class Project {
  @@ -350,13 +350,12 @@
       }
   
       /**
  -     * Returns a list of build listeners for the project. The returned
  -     * vector is "live" and so should not be modified.
  +     * Returns a list of build listeners for the project. 
        *
        * @return a list of build listeners for the project
        */
       public Vector getBuildListeners() {
  -        return listeners;
  +        return (Vector) listeners.clone();
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message