jstrachan    01/05/22 08:53:29

  Modified:    collections/src/java/org/apache/commons/collections
                        CollectionUtils.java
  Log:
  Patched the select(inputCollection, predicate, outputCollection) method so that it 
does not return a variable, to avoid any confusion with the select(inputCollection, 
predicate) method which returns the outputCollection.
  
  Revision  Changes    Path
  1.4       +5 -8      
jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java
  
  Index: CollectionUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CollectionUtils.java      2001/05/06 11:04:25     1.3
  +++ CollectionUtils.java      2001/05/22 15:53:06     1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java,v
 1.3 2001/05/06 11:04:25 jstrachan Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/05/06 11:04:25 $
  + * $Header: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/CollectionUtils.java,v
 1.4 2001/05/22 15:53:06 jstrachan Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/05/22 15:53:06 $
    *
    * ====================================================================
    *
  @@ -76,7 +76,7 @@
    *
    * @author Rodney Waldhoff
    *
  - * @version $Id: CollectionUtils.java,v 1.3 2001/05/06 11:04:25 jstrachan Exp $
  + * @version $Id: CollectionUtils.java,v 1.4 2001/05/22 15:53:06 jstrachan Exp $
    */
   public class CollectionUtils {
       /**
  @@ -325,10 +325,8 @@
       
       /** Selects all elements from inputCollection which match the given predicate
         * and adds them to outputCollection
  -      *
  -      * @return the outputCollection
         */
  -    public static Collection select( Collection inputCollection, Predicate 
predicate, Collection outputCollection ) {
  +    public static void select( Collection inputCollection, Predicate predicate, 
Collection outputCollection ) {
           if ( inputCollection != null && predicate != null ) {            
               for ( Iterator iter = inputCollection.iterator(); iter.hasNext(); ) {
                   Object item = iter.next();
  @@ -337,7 +335,6 @@
                   }
               }
           }
  -        return outputCollection;
       }
       
       /** Transforms all elements from inputCollection with the given transformer 
  
  
  

Reply via email to