commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r666317 - in /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite: BaseBinaryPredicateList.java BasePredicateList.java BaseUnaryPredicateList.java
Date Tue, 10 Jun 2008 20:54:20 GMT
Author: mbenson
Date: Tue Jun 10 13:54:20 2008
New Revision: 666317

URL: http://svn.apache.org/viewvc?rev=666317&view=rev
Log:
Make it illegal to add a null predicate to a predicate list

Modified:
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseBinaryPredicateList.java
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BasePredicateList.java
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseUnaryPredicateList.java

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseBinaryPredicateList.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseBinaryPredicateList.java?rev=666317&r1=666316&r2=666317&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseBinaryPredicateList.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseBinaryPredicateList.java
Tue Jun 10 13:54:20 2008
@@ -105,6 +105,9 @@
      * @param p BinaryPredicate to add
      */
     protected void addBinaryPredicate(BinaryPredicate<? super L, ? super R> p) {
+        if (p == null) {
+            throw new IllegalArgumentException("Cannot add null BinaryPredicate");
+        }
         list.add(p);
     }
 

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BasePredicateList.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BasePredicateList.java?rev=666317&r1=666316&r2=666317&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BasePredicateList.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BasePredicateList.java
Tue Jun 10 13:54:20 2008
@@ -104,6 +104,9 @@
      * @param p Predicate to add
      */
     protected void addPredicate(Predicate p) {
+        if (p == null) {
+            throw new IllegalArgumentException("Cannot add null Predicate");
+        }
         list.add(p);
     }
 

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseUnaryPredicateList.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseUnaryPredicateList.java?rev=666317&r1=666316&r2=666317&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseUnaryPredicateList.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/BaseUnaryPredicateList.java
Tue Jun 10 13:54:20 2008
@@ -105,6 +105,9 @@
      * @param p UnaryPredicate to add
      */
     protected void addUnaryPredicate(UnaryPredicate<? super A> p) {
+        if (p == null) {
+            throw new IllegalArgumentException("Cannot add null UnaryPredicate");
+        }
         list.add(p);
     }
 



Mime
View raw message