You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/10/24 23:40:18 UTC

svn commit: r1188396 - /commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java

Author: sebb
Date: Mon Oct 24 21:40:17 2011
New Revision: 1188396

URL: http://svn.apache.org/viewvc?rev=1188396&view=rev
Log:
Rename to avoid hiding super field

Modified:
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java?rev=1188396&r1=1188395&r2=1188396&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java (original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/FilteredIterable.java Mon Oct 24 21:40:17 2011
@@ -102,18 +102,18 @@ public class FilteredIterable<T> impleme
 
     /**
      * Retain only elements matching <code>predicate</code>.
-     * @param predicate filter, non-<code>null</code>
+     * @param filter filter predicate, non-<code>null</code>
      * @return <code>this</code>, fluently
      */
-    public FilteredIterable<T> retain(UnaryPredicate<? super T> predicate) {
-        if (predicate == null) {
+    public FilteredIterable<T> retain(UnaryPredicate<? super T> filter) {
+        if (filter == null) {
             throw new NullPointerException("filtering predicate was null");
         }
         synchronized (this) {
             if (this.predicate == null) {
                 this.predicate = new UnaryAnd<T>();
             }
-            this.predicate.and(predicate);
+            this.predicate.and(filter);
         }
         return this;
     }