You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/06/23 16:21:52 UTC

svn commit: r1353130 - /commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java

Author: tn
Date: Sat Jun 23 14:21:51 2012
New Revision: 1353130

URL: http://svn.apache.org/viewvc?rev=1353130&view=rev
Log:
[COLLECTIONS-414] work-around for test-case when providing null argument to static method that infers return type based on input argument.

Modified:
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java?rev=1353130&r1=1353129&r2=1353130&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java Sat Jun 23 14:21:51 2012
@@ -522,7 +522,8 @@ public class TestCollectionUtils extends
         Closure<List<? extends Number>> resultClosure = CollectionUtils.forAllDo(col, testClosure);
         assertSame(testClosure, resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
-        resultClosure = CollectionUtils.forAllDo(col, null);
+        // this is a work-around for issue COLLECTIONS-414, casting should not be necessary
+        resultClosure = CollectionUtils.forAllDo(col, (Closure<List<? extends Number>>) null);
         assertNull(resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
         resultClosure = CollectionUtils.forAllDo(null, testClosure);